public abstract class Plugin extends Object implements PluginDefinition
ExecutorPlugin instead| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION_PROPERTY |
static String |
GROUP_PROPERTY |
protected int |
iterationNumber |
static String |
NAME_PROPERTY |
protected PercentageSetter |
percentageSetter |
static String |
PLUGIN_PROPERTIES_SUFFIX_FILENAME |
protected Properties |
properties |
protected UUID |
uuid |
static String |
VERSION_PROPERTY |
| Constructor and Description |
|---|
Plugin() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
This method is used by executor to retrieve the Plugin human oriented description.
|
String |
getGroup()
This method is used by executor to retrieve the Plugin group
It will be published on the IS instance created by the executor
|
int |
getIterationNumber() |
String |
getName()
This method is used by executor to retrieve the Plugin name
It will be published on the IS instance created by the executor
|
Map<String,String> |
getSupportedCapabilities()
This method is used by the Executor to get a key-value
Map
to be published on IS , so a client which want to
launch a Plugin only under certain condition can query the IS
to obtain its own filtered list. |
UUID |
getUUID() |
String |
getVersion()
This method is used by executor to retrieve the plugin version.
|
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 |
setIterationNumber(int iterationNumber) |
protected void |
setPercentageEvolution(Integer integer) |
void |
setPercentageSetter(PercentageSetter percentageSetter) |
void |
setUUID(UUID uuid) |
void |
stop()
Invoke onStop() function to allow the plugin to safely stop the execution
|
public static final String PLUGIN_PROPERTIES_SUFFIX_FILENAME
public static final String GROUP_PROPERTY
public static final String NAME_PROPERTY
public static final String VERSION_PROPERTY
public static final String DESCRIPTION_PROPERTY
protected Properties properties
protected UUID uuid
protected int iterationNumber
protected PercentageSetter percentageSetter
public String getGroup()
PluginDefinitiongetGroup in interface PluginDefinitionpublic String getName()
PluginDefinitiongetName in interface PluginDefinitionpublic String getVersion()
PluginDefinitiongetVersion in interface PluginDefinitionpublic String getDescription()
PluginDefinitiongetDescription in interface PluginDefinitionpublic Map<String,String> getSupportedCapabilities()
PluginDefinitionMap
to be published on IS , so a client which want to
launch a Plugin only under certain condition can query the IS
to obtain its own filtered list.getSupportedCapabilities in interface PluginDefinitionMap with the supported capabilitiespublic void setPercentageSetter(PercentageSetter percentageSetter)
percentageSetter - the percentageSetter to setprotected void setPercentageEvolution(Integer integer)
public UUID getUUID()
public void setUUID(UUID uuid)
uuid - the uuid to setpublic int getIterationNumber()
public void setIterationNumber(int iterationNumber)
iterationNumber - the iterationNumner to setpublic abstract void launch(Map<String,Object> inputs) throws Exception
inputs - Exception - if the launch failsprotected abstract void onStop()
throws Exception
Exception - if the launch failsCopyright © 2022. All Rights Reserved.