public class StandardPluginLifecycleHandler extends PluginLifecycleHandler
Configuration parameters
This life cycle handler implementation supports following configuration parameters:
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 is false
that corresponds to standard delegation model
for classloaders hierarchy that corresponds to JLS.true
then class loading will
be synchronized with initial plug-in classloader instance. Otherwise
this
instance will be used as synchronizing monitor. Default
value is false
.true
then 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 is true
.true
then 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 is true
.Constructor and Description |
---|
StandardPluginLifecycleHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterPluginStop(Plugin plugin)
This method does nothing in this implementation.
|
protected void |
beforePluginStart(Plugin plugin)
This method does nothing in this implementation.
|
void |
configure(ExtendedProperties config)
Configures this handler instance.
|
protected PluginClassLoader |
createPluginClassLoader(PluginDescriptor descr)
Creates standard implementation of plug-in class loader.
|
protected Plugin |
createPluginInstance(PluginDescriptor descr)
Creates instance of plug-in class calling it's default (no-arguments)
constructor.
|
protected void |
dispose()
This method does nothing in this implementation.
|
getPluginManager, init
protected PluginClassLoader createPluginClassLoader(PluginDescriptor descr)
createPluginClassLoader
in class PluginLifecycleHandler
descr
- plug-in descriptorPluginLifecycleHandler.createPluginClassLoader(
org.java.plugin.registry.PluginDescriptor)
protected Plugin createPluginInstance(PluginDescriptor descr) throws PluginLifecycleException
plug-in's class loader
.createPluginInstance
in class PluginLifecycleHandler
descr
- plug-in descriptorPluginLifecycleException
- if plug-in class can't be instantiated
for some reasonPluginLifecycleHandler.createPluginInstance(
org.java.plugin.registry.PluginDescriptor)
protected void beforePluginStart(Plugin plugin)
beforePluginStart
in class PluginLifecycleHandler
plugin
- plug-in being startingPluginLifecycleHandler.beforePluginStart(
org.java.plugin.Plugin)
protected void afterPluginStop(Plugin plugin)
afterPluginStop
in class PluginLifecycleHandler
plugin
- plug-in being stoppingPluginLifecycleHandler.afterPluginStop(
org.java.plugin.Plugin)
protected void dispose()
dispose
in class PluginLifecycleHandler
PluginLifecycleHandler.dispose()
public void configure(ExtendedProperties config)
PluginLifecycleHandler
PluginLifecycleHandler.init(PluginManager)
, usually this is done in
object factory
implementation.configure
in class PluginLifecycleHandler
config
- handler configuration dataPluginLifecycleHandler.configure(
ExtendedProperties)
Copyright © 2015. All Rights Reserved.