|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.java.plugin.Plugin
public abstract class Plugin
This is base for "home" class of plug-in runtime. Using this class,
plug-in code can get access to plug-in framework
(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.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
Makes logging service available for descending classes. |
Constructor Summary | |
---|---|
Plugin()
|
Method Summary | |
---|---|
protected 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. |
PluginDescriptor |
getDescriptor()
|
Extension |
getExtension(java.lang.String id)
|
ExtensionPoint |
getExtensionPoint(java.lang.String id)
|
java.util.List<ExtensionPoint> |
getExtensionPoints()
Returns list of all extension points defined in manifest. |
java.util.List<Extension> |
getExtensions()
Returns a list of all extensions provided by this plugin. |
PluginManager |
getManager()
|
java.util.List<com.google.inject.Module> |
getModules()
Returns a list of modules provided by this plugin |
java.lang.ClassLoader |
getPluginClassLoader()
Returns the plugins ClassLoader |
boolean |
isActive()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
Constructor Detail |
---|
public Plugin()
Method Detail |
---|
public final PluginDescriptor getDescriptor()
public final PluginManager getManager()
public final boolean isActive()
true
if this plug-in is in active stateprotected abstract void doStart() throws java.lang.Exception
java.lang.Exception
- if an error has occurred during plug-in start-upprotected abstract void doStop() throws java.lang.Exception
doStart()
method will be called again (but for another
instance of this class).
java.lang.Exception
- if an error has occurred during plug-in shutdownpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.util.List<Extension> getExtensions()
public Extension getExtension(java.lang.String id)
id
- extension ID
null
public java.util.List<ExtensionPoint> getExtensionPoints()
ExtensionPoint
objectspublic ExtensionPoint getExtensionPoint(java.lang.String id)
id
- extension point ID
null
public java.lang.ClassLoader getPluginClassLoader()
public java.util.List<com.google.inject.Module> getModules()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |