public abstract class PluginLifecycleHandler extends Object
Constructor and Description |
---|
PluginLifecycleHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
afterPluginStop(Plugin plugin)
This method will be called by
PluginManager just after stopping
plug-in. |
protected abstract void |
beforePluginStart(Plugin plugin)
This method will be called by
PluginManager just before starting
plug-in. |
protected abstract void |
configure(ExtendedProperties config)
Configures this handler instance.
|
protected abstract PluginClassLoader |
createPluginClassLoader(PluginDescriptor descr)
This method should create new instance of class loader for given plug-in.
|
protected abstract Plugin |
createPluginInstance(PluginDescriptor descr)
This method should create new instance of plug-in class.
|
protected abstract void |
dispose()
Should dispose all resources allocated by this handler instance.
|
protected PluginManager |
getPluginManager() |
protected void |
init(PluginManager aManager)
Initializes this handler instance.
|
protected void init(PluginManager aManager)
aManager
- a plug-in manager, this handler is "connected" toprotected PluginManager getPluginManager()
protected abstract void configure(ExtendedProperties config)
init(PluginManager)
, usually this is done in
object factory
implementation.config
- handler configuration dataprotected abstract PluginClassLoader createPluginClassLoader(PluginDescriptor descr)
descr
- plug-in descriptorprotected abstract Plugin createPluginInstance(PluginDescriptor descr) throws PluginLifecycleException
PluginDescriptor.getPluginClassName()
returns blank string or
null
.descr
- plug-in descriptorPluginLifecycleException
- if plug-in class can't be instantiated
for some reasonprotected abstract void beforePluginStart(Plugin plugin) throws PluginLifecycleException
PluginManager
just before starting
plug-in. Put here any "initializing" logic that should be executed before
plug-in start.plugin
- plug-in being startingPluginLifecycleException
- if plug-in can't be "initialized"protected abstract void afterPluginStop(Plugin plugin) throws PluginLifecycleException
PluginManager
just after stopping
plug-in. Put here any "un-initializing" logic that should be executed
after plug-in stop.plugin
- plug-in being stoppingPluginLifecycleException
- if plug-in can't be "un-initialized"protected abstract void dispose()
Copyright © 2017. All rights reserved.