|
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.standard.PluginLifecycleHandler
public abstract class PluginLifecycleHandler
Manager class that handles plug-in life cycle related logic. This class is part of standard implementation of plug-in manager, other implementations may not use it at all. The main purpose of this class is to simplify customization of plug-in manager behavior.
Constructor Summary | |
---|---|
PluginLifecycleHandler()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginLifecycleHandler()
Method Detail |
---|
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 descriptor
protected abstract Plugin createPluginInstance(PluginDescriptor descr) throws PluginLifecycleException
PluginDescriptor.getPluginClassName()
returns blank string or
null
.
descr
- plug-in descriptor
PluginLifecycleException
- 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 starting
PluginLifecycleException
- 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 stopping
PluginLifecycleException
- if plug-in can't be "un-initialized"protected abstract void dispose()
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |