|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.java.plugin.PluginManager org.java.plugin.standard.StandardPluginManager
public final class StandardPluginManager
Standard implementation of plug-in manager.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.java.plugin.PluginManager |
---|
PluginManager.EventListener, PluginManager.EventListenerAdapter, PluginManager.PluginLocation |
Field Summary |
---|
Fields inherited from class org.java.plugin.PluginManager |
---|
VERSION, VERSION_PROPERTY |
Constructor Summary | |
---|---|
protected |
StandardPluginManager(PluginRegistry aRegistry,
PathResolver aPathResolver,
PluginLifecycleHandler aLifecycleHandler)
Creates instance of plug-in manager for given registry, path resolver and life cycle handler. |
Method Summary | |
---|---|
void |
activatePlugin(java.lang.String id)
Activates plug-in with given ID if it is not activated yet. |
void |
deactivatePlugin(java.lang.String id)
Deactivates plug-in with given ID if it has been successfully activated before. |
PluginDescriptor[] |
disablePlugin(PluginDescriptor descr)
Disables plug-in (with dependencies) in this manager instance. |
PluginDescriptor[] |
enablePlugin(PluginDescriptor descr,
boolean includeDependings)
Enables plug-in (or plug-ins) in this manager instance. |
PathResolver |
getPathResolver()
|
Plugin |
getPlugin(java.lang.String id)
Looks for plug-in with given ID and activates it if it is not activated yet. |
PluginClassLoader |
getPluginClassLoader(PluginDescriptor descr)
Returns instance of plug-in's class loader and not tries to activate plug-in. |
Plugin |
getPluginFor(java.lang.Object obj)
Looks for plug-in, given object belongs to. |
PluginRegistry |
getRegistry()
|
boolean |
isBadPlugin(PluginDescriptor descr)
|
boolean |
isPluginActivated(PluginDescriptor descr)
|
boolean |
isPluginActivating(PluginDescriptor descr)
|
boolean |
isPluginEnabled(PluginDescriptor descr)
|
java.util.Map<java.lang.String,Identity> |
publishPlugins(PluginManager.PluginLocation[] locations)
Registers plug-ins and their locations with this plug-in manager. |
void |
registerListener(PluginManager.EventListener listener)
Registers plug-in manager event listener. |
void |
shutdown()
Shuts down the framework. |
void |
unregisterListener(PluginManager.EventListener listener)
Unregisters manager event listener. |
Methods inherited from class org.java.plugin.PluginManager |
---|
disposeClassLoader, initPlugin, lookup, notifyClassLoader, startPlugin, stopPlugin |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StandardPluginManager(PluginRegistry aRegistry, PathResolver aPathResolver, PluginLifecycleHandler aLifecycleHandler)
aRegistry
- some implementation of plug-in registry interfaceaPathResolver
- some implementation of path resolver interfaceaLifecycleHandler
- an implementation of plug-in life cycle handlerStandardObjectFactory
Method Detail |
---|
public PluginRegistry getRegistry()
getRegistry
in class PluginManager
PluginManager.getRegistry()
public PathResolver getPathResolver()
getPathResolver
in class PluginManager
PluginManager.getPathResolver()
public java.util.Map<java.lang.String,Identity> publishPlugins(PluginManager.PluginLocation[] locations) throws JpfException
PluginRegistry.register(URL[])
method that just makes plug-in's
meta-data available for reading and doesn't "know" where are things
actually located).
publishPlugins
in class PluginManager
locations
- plug-in locations data
JpfException
- if given plug-ins can't be registered or published (optional
behavior)PluginDescriptor
,
PluginFragment
public Plugin getPlugin(java.lang.String id) throws PluginLifecycleException
null
.
getPlugin
in class PluginManager
id
- plug-in ID
PluginLifecycleException
- if plug-in can't be found or activatedpublic void activatePlugin(java.lang.String id) throws PluginLifecycleException
activatePlugin
in class PluginManager
id
- plug-in ID
PluginLifecycleException
- if plug-in can't be found or activatedpublic Plugin getPluginFor(java.lang.Object obj)
getPluginFor
in class PluginManager
obj
- any object that maybe belongs to some plug-in
null
if given object doesn't belong to
any plug-in (possibly it is part of "host" application) and thus
doesn't managed by the Framework directly or indirectlypublic boolean isPluginActivated(PluginDescriptor descr)
isPluginActivated
in class PluginManager
descr
- plug-in descriptor
true
if plug-in with given descriptor is activatedpublic boolean isBadPlugin(PluginDescriptor descr)
isBadPlugin
in class PluginManager
descr
- plug-in descriptor
true
if plug-in disabled as it's activation failspublic boolean isPluginActivating(PluginDescriptor descr)
isPluginActivating
in class PluginManager
descr
- plug-in descriptor
true
if plug-in is currently activatingpublic PluginClassLoader getPluginClassLoader(PluginDescriptor descr)
getPluginClassLoader
in class PluginManager
descr
- plug-in descriptor
public void shutdown()
shutdown
in class PluginManager
public void deactivatePlugin(java.lang.String id)
deactivatePlugin
in class PluginManager
id
- plug-in IDpublic PluginDescriptor[] disablePlugin(PluginDescriptor descr)
disablePlugin
in class PluginManager
descr
- descriptor of plug-in to be disabled
public PluginDescriptor[] enablePlugin(PluginDescriptor descr, boolean includeDependings)
enablePlugin
in class PluginManager
descr
- descriptor of plug-in to be enabledincludeDependings
- if true
, depending plug-ins will be also
enabled
disablePlugin(PluginDescriptor)
public boolean isPluginEnabled(PluginDescriptor descr)
isPluginEnabled
in class PluginManager
descr
- plug-in descriptor
true
if given plug-in is disabled in this managerpublic void registerListener(PluginManager.EventListener listener)
IllegalArgumentException
.
registerListener
in class PluginManager
listener
- new manager event listenerpublic void unregisterListener(PluginManager.EventListener listener)
IllegalArgumentException
.
unregisterListener
in class PluginManager
listener
- registered listener
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |