public abstract class Plugin<T extends PluginDeclaration> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
iterationNumber |
protected PercentageSetter |
percentageSetter |
protected T |
pluginDeclaration |
protected UUID |
uuid |
| Modifier and Type | Method and Description |
|---|---|
int |
getIterationNumber() |
T |
getPluginDeclaration() |
UUID |
getUUID() |
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
|
protected UUID uuid
protected int iterationNumber
protected T extends PluginDeclaration pluginDeclaration
protected PercentageSetter percentageSetter
public Plugin(T pluginDeclaration)
public T getPluginDeclaration()
public 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)
iterationNumner - 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 © 2017. All Rights Reserved.