Package org.pf4j
Class Plugin
java.lang.Object
org.pf4j.Plugin
This class will be extended by all plugins and
serve as the common class between a plugin and the application.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Logger
Makes logging service available for descending classes.protected PluginWrapper
Wrapper of the plugin. -
Constructor Summary
ConstructorsConstructorDescriptionPlugin
(PluginWrapper wrapper) Constructor to be used by plugin manager for plugin instantiation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
This method is called by the application when the plugin is deleted.final PluginWrapper
Retrieves the wrapper of this plug-in.void
start()
This method is called by the application when the plugin is started.void
stop()
This method is called by the application when the plugin is stopped.
-
Field Details
-
log
protected final org.slf4j.Logger logMakes logging service available for descending classes. -
wrapper
Wrapper of the plugin.
-
-
Constructor Details
-
Plugin
Constructor to be used by plugin manager for plugin instantiation. Your plugins have to provide constructor with this exact signature to be successfully loaded by manager.
-
-
Method Details
-
getWrapper
Retrieves the wrapper of this plug-in. -
start
public void start()This method is called by the application when the plugin is started. SeePluginManager.startPlugin(String)
. -
stop
public void stop()This method is called by the application when the plugin is stopped. SeePluginManager.stopPlugin(String)
. -
delete
public void delete()This method is called by the application when the plugin is deleted. SeePluginManager.deletePlugin(String)
.
-