|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A plugin framework. Implementations of this interface provide a framework for the plugin system. They must manage a set of plugins and provide the implementations of PluginLinker and APIProvider allowing plugins to communicate with one another. A Framework must also provide itself as an API within its own context, with the version specified by CURRENT_FRAMEWORK_VERSION.
All implementations must be thread-safe.
Field Summary | |
static ConstrainedKey |
CONTINUE_ON_DUPLICATE_PLUGINS_PROPERTY
Property key for continuing on duplicate plugins. |
static ConstrainedKey |
CONTINUE_ON_SUPPRESSED_PLUGINS_PROPERTY
Property key for continuing on suppressed plugins. |
static APIVersion |
CURRENT_FRAMEWORK_APIVERSION
The version of the Framework API. |
Method Summary | |
void |
addFrameworkProgressListener(FrameworkProgressListener listener)
Register a listener on the Framework. |
ObjectSet |
getAvailableAPINames()
Get the names of the currently available APIs as an ObjectSet of Strings. |
ObjectSet |
getAvailableAPIVersions(String name)
Get the names of the currently available versions of the given API as an ObjectSet of APIVersions. |
ObjectSet |
getPluginIDSet()
Get the ids of the currently available plugins as an ObjectSet of PluginIDs. |
PluginInfo |
getPluginInfo(PluginID plugin)
Get the PluginInfo object for the given plugin. |
RequestablePropertySet |
getProperties()
Get properties of this Framework. |
PluginID |
getProvidingPluginFor(String name,
APIVersion version)
Get the PluginID of the plugin that provides the given API and version. |
void |
plug(PluginInfo[] infoArray)
Attempt to plug in the given Plugins. |
APIProvider |
provideAPI(Class cls,
APIVersion version,
String description,
Object impl)
Register an API with no providing plugin. |
void |
removeFrameworkProgressListener(FrameworkProgressListener listener)
Remove a listener on the Framework. |
void |
unplug(PluginID[] idArray)
Attempt to unplug in the given Plugins. |
Field Detail |
public static final APIVersion CURRENT_FRAMEWORK_APIVERSION
public static final ConstrainedKey CONTINUE_ON_DUPLICATE_PLUGINS_PROPERTY
public static final ConstrainedKey CONTINUE_ON_SUPPRESSED_PLUGINS_PROPERTY
Method Detail |
public RequestablePropertySet getProperties()
public ObjectSet getPluginIDSet()
public PluginInfo getPluginInfo(PluginID plugin)
plugin
- plugin id
public ObjectSet getAvailableAPINames()
public ObjectSet getAvailableAPIVersions(String name)
name
- name of API to query
public PluginID getProvidingPluginFor(String name, APIVersion version) throws APINotAvailableException
name
- name of API to queryversion
- version of API to query
APINotAvailableException
- the given api and version not provided.public void plug(PluginInfo[] infoArray) throws PluginException
infoArray
- array of PluginInfo objects
PluginException
- couldn't start up the plugins
IllegalStateException
- a plug or unplug job is already in progresspublic void unplug(PluginID[] idArray) throws PluginException
idArray
- array of PluginIDs
PluginException
- couldn't shut down the plugins
IllegalStateException
- a plug or unplug job is already in progresspublic APIProvider provideAPI(Class cls, APIVersion version, String description, Object impl) throws DuplicateAPIException
cls
- interface classversion
- API versiondescription
- description Stringimpl
- implementation object
DuplicateAPIException
- the given API version already exists.public void addFrameworkProgressListener(FrameworkProgressListener listener)
listener
- the listenerpublic void removeFrameworkProgressListener(FrameworkProgressListener listener)
listener
- the listener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |