Package org.java.plugin.standard
Class StandardPluginLifecycleHandler
java.lang.Object
org.java.plugin.standard.PluginLifecycleHandler
org.java.plugin.standard.StandardPluginLifecycleHandler
Standard implementation of plug-in life cycle handler.
Configuration parameters
This life cycle handler implementation supports following configuration parameters:
- probeParentLoaderLast
- If
true, plug-in classloader will try loading classes from system (boot) classpath after trying to load them from plug-in classpath. Otherwise system classpath will be used first. Default value isfalsethat corresponds to standard delegation model for classloaders hierarchy that corresponds to JLS. - stickySynchronizing
- Allows advanced configuring of classloaders synchronization in
multy-threaded environment. If
truethen class loading will be synchronized with initial plug-in classloader instance. Otherwisethisinstance will be used as synchronizing monitor. Default value isfalse. - localClassLoadingOptimization
- If
truethen plug-in classloader will collect local packages statistics to predict class location. This allow to optimize class look-up procedure for classes that belong to the requested plug-in. Default value istrue. - foreignClassLoadingOptimization
- If
truethen plug-in classloader will collect statistics for "foreign" classes - those which belong to depending plug-ins. This allow to optimize class look-up procedure when enumerating depending plug-ins. Default value istrue.
- Version:
- $Id: StandardPluginLifecycleHandler.java,v 1.5 2007/04/07 12:39:50 ddimon Exp $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterPluginStop(Plugin plugin) This method does nothing in this implementation.protected voidbeforePluginStart(Plugin plugin) This method does nothing in this implementation.voidconfigure(ExtendedProperties config) Configures this handler instance.protected PluginClassLoaderCreates standard implementation of plug-in class loader.protected PluginCreates instance of plug-in class calling it's default (no-arguments) constructor.protected voiddispose()This method does nothing in this implementation.Methods inherited from class org.java.plugin.standard.PluginLifecycleHandler
getPluginManager, init
-
Constructor Details
-
StandardPluginLifecycleHandler
public StandardPluginLifecycleHandler()
-
-
Method Details
-
createPluginClassLoader
Creates standard implementation of plug-in class loader.- Specified by:
createPluginClassLoaderin classPluginLifecycleHandler- Parameters:
descr- plug-in descriptor- Returns:
- class loader instance for given plug-in
- See Also:
-
createPluginInstance
Creates instance of plug-in class calling it's default (no-arguments) constructor. Class look-up is done withplug-in's class loader.- Specified by:
createPluginInstancein classPluginLifecycleHandler- Parameters:
descr- plug-in descriptor- Returns:
- new not initialized instance of plug-in class
- Throws:
PluginLifecycleException- if plug-in class can't be instantiated for some reason- See Also:
-
beforePluginStart
This method does nothing in this implementation.- Specified by:
beforePluginStartin classPluginLifecycleHandler- Parameters:
plugin- plug-in being starting- See Also:
-
afterPluginStop
This method does nothing in this implementation.- Specified by:
afterPluginStopin classPluginLifecycleHandler- Parameters:
plugin- plug-in being stopping- See Also:
-
dispose
protected void dispose()This method does nothing in this implementation.- Specified by:
disposein classPluginLifecycleHandler- See Also:
-
configure
Description copied from class:PluginLifecycleHandlerConfigures this handler instance. Note that this method should be called once beforePluginLifecycleHandler.init(PluginManager), usually this is done inobject factoryimplementation.- Specified by:
configurein classPluginLifecycleHandler- Parameters:
config- handler configuration data- See Also:
-