Package org.java.plugin
Class Plugin
java.lang.Object
org.java.plugin.Plugin
- Direct Known Subclasses:
ApplicationPlugin
This is base for "home" class of plug-in runtime. Using this class,
plug-in code can get access to plug-in framework
(
Plug-in vendor may provide it's own implementation of this class if some actions should be performed during plug-in activation/deactivation. When no class specified, framework provides default "empty" implementation that does nothing when plug-in started and stopped.
manager
,
registry
) which was loaded it.
It is also used by manager during plug-in life cycle management (activation
and deactivation).
Plug-in vendor may provide it's own implementation of this class if some actions should be performed during plug-in activation/deactivation. When no class specified, framework provides default "empty" implementation that does nothing when plug-in started and stopped.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
Makes logging service available for descending classes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doStart()
This method will be called once during plug-in activation before any access to any code from this plug-in.protected abstract void
doStop()
This method will be called once during plug-in deactivation.final PluginDescriptor
final PluginManager
final boolean
isActive()
toString()
-
Field Details
-
log
protected final org.apache.commons.logging.Log logMakes logging service available for descending classes.
-
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
getDescriptor
- Returns:
- descriptor of this plug-in
-
getManager
- Returns:
- manager which controls this plug-in
-
isActive
public final boolean isActive()- Returns:
true
if this plug-in is in active state
-
doStart
This method will be called once during plug-in activation before any access to any code from this plug-in.- Throws:
Exception
- if an error has occurred during plug-in start-up
-
doStop
This method will be called once during plug-in deactivation. After this method call, no other code from this plug-in can be accessed, unlessdoStart()
method will be called again (but for another instance of this class).- Throws:
Exception
- if an error has occurred during plug-in shutdown
-
toString
-