public abstract class Plugin<T extends PluginDeclaration> extends Object
| Constructor and Description |
|---|
Plugin(T pluginDeclaration,
Persistence<? extends PersistenceConnector> persistence) |
| Modifier and Type | Method and Description |
|---|---|
T |
getPluginDeclaration() |
PluginState |
getState()
Used to retrieve the state of the execution
|
abstract void |
launch(Map<String,Object> inputs)
Launch the plugin with the provided input.
|
protected abstract void |
onStop()
This function is used to correctly stop the plugin
|
void |
setState(PluginState pluginState)
It is up to the plugin update the State of the Running Plugin using
this facilities function.
|
void |
stop()
Stop the Plugin setting state to
PluginState.SUSPENDED |
public Plugin(T pluginDeclaration, Persistence<? extends PersistenceConnector> persistence)
public T getPluginDeclaration()
public void setState(PluginState pluginState)
pluginState - Exceptionpublic abstract void launch(Map<String,Object> inputs) throws Exception
inputs - Exception - if the launch failsprotected abstract void onStop()
throws Exception
Exception - if the launch failspublic void stop()
throws Exception
PluginState.SUSPENDEDExceptionpublic PluginState getState() throws Exception
PluginStateExceptionCopyright © 2015. All Rights Reserved.