| |
|
| java.lang.Object org.java.plugin.PluginManager org.java.plugin.standard.StandardPluginManager
StandardPluginManager | final public class StandardPluginManager extends PluginManager (Code) | | Standard implementation of plug-in manager.
version: $Id: StandardPluginManager.java,v 1.8 2007/04/07 12:41:01 ddimon Exp $ |
Inner Class :final static class EmptyPlugin extends Plugin | |
StandardPluginManager | protected StandardPluginManager(PluginRegistry aRegistry, PathResolver aPathResolver, PluginLifecycleHandler aLifecycleHandler)(Code) | | Creates instance of plug-in manager for given registry, path resolver and
life cycle handler.
Parameters: aRegistry - some implementation of plug-in registry interface Parameters: aPathResolver - some implementation of path resolver interface Parameters: aLifecycleHandler - an implementation of plug-in life cycle handler See Also: StandardObjectFactory |
deactivatePlugin | public void deactivatePlugin(String id)(Code) | | Deactivates plug-in with given ID if it has been successfully activated
before. Note that this method will effectively deactivate all plug-ins
that depend on the given plug-in.
Parameters: id - plug-in ID |
disablePlugin | public PluginDescriptor[] disablePlugin(PluginDescriptor descr)(Code) | | Disables plug-in (with dependencies) in this manager instance. Disabled
plug-in can't be activated although it may be valid and successfully
registered with plug-in registry. Before disabling, plug-in will be
deactivated if it was successfully activated.
Be careful with this method as it can effectively disable large set of
inter-depending plug-ins and your application may become unstable or even
disabled as whole.
Parameters: descr - descriptor of plug-in to be disabled descriptors of plug-ins that was actually disabled |
getPluginClassLoader | public PluginClassLoader getPluginClassLoader(PluginDescriptor descr)(Code) | | Returns instance of plug-in's class loader and not tries to activate
plug-in. Use this method if you need to get access to plug-in resources
and don't want to cause plug-in activation.
Parameters: descr - plug-in descriptor class loader instance for plug-in with given descriptor |
getPluginFor | public Plugin getPluginFor(Object obj)(Code) | | Looks for plug-in, given object belongs to.
Parameters: obj - any object that maybe belongs to some plug-in plug-in or null if given object doesn't belong toany plug-in (possibly it is part of "host" application) and thusdoesn't managed by the Framework directly or indirectly |
isBadPlugin | public boolean isBadPlugin(PluginDescriptor descr)(Code) | | Parameters: descr - plug-in descriptor true if plug-in disabled as it's activation fails |
isPluginActivated | public boolean isPluginActivated(PluginDescriptor descr)(Code) | | Parameters: descr - plug-in descriptor true if plug-in with given descriptor is activated |
isPluginActivating | public boolean isPluginActivating(PluginDescriptor descr)(Code) | | Parameters: descr - plug-in descriptor true if plug-in is currently activating |
isPluginEnabled | public boolean isPluginEnabled(PluginDescriptor descr)(Code) | | Parameters: descr - plug-in descriptor true if given plug-in is disabled in this manager |
publishPlugins | public Map<String, Identity> publishPlugins(PluginLocation[] locations) throws JpfException(Code) | | Registers plug-ins and their locations with this plug-in manager. You
should use this method to register new plug-ins to make them available
for activation with this manager instance (compare this to
PluginRegistry.register(URL[]) method that just makes plug-in's
meta-data available for reading and doesn't "know" where are things
actually located).
Parameters: locations - plug-in locations data map where keys are manifest URL's and values are registeredplug-ins or plug-in fragments, URL's for unprocessed manifestsare not included throws: JpfException - if given plug-ins can't be registered or published (optionalbehavior) |
registerListener | public void registerListener(EventListener listener)(Code) | | Registers plug-in manager event listener. If given listener has been
registered before, this method will throw an
IllegalArgumentException .
Parameters: listener - new manager event listener |
registryChangeHandler | synchronized void registryChangeHandler(RegistryChangeData data)(Code) | | Method to handle plug-in registry change events.
Parameters: data - registry change data holder |
shutdown | public synchronized void shutdown()(Code) | | Shuts down the framework.
Calling this method will deactivate all active plug-ins in order, reverse
to the order they was activated. It also releases all resources allocated
by this manager (class loaders, plug-in descriptors etc.). All disabled
plug-ins will be marked as "enabled", all registered event listeners will
be unregistered.
|
unregisterListener | public void unregisterListener(EventListener listener)(Code) | | Unregisters manager event listener. If given listener hasn't been
registered before, this method will throw an
IllegalArgumentException .
Parameters: listener - registered listener |
|
|
|