Class RunnablePlugin<T extends org.gcube.vremanagement.executor.plugin.Plugin>
java.lang.Object
org.gcube.vremanagement.executor.pluginmanager.RunnablePlugin<T>
- All Implemented Interfaces:
Runnable
public class RunnablePlugin<T extends org.gcube.vremanagement.executor.plugin.Plugin>
extends Object
implements Runnable
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()protected voidsetPercentage(Integer percentage) voidsetState(org.gcube.vremanagement.executor.plugin.PluginState pluginState) voidprotected voidsetState(org.gcube.vremanagement.executor.plugin.PluginState pluginState, Integer percentage, Exception exception) It is up to the plugin to update the State of the Running Plugin using this facilities function.voidstop()Stop the Plugin setting state toPluginState.STOPPEDtoString()
-
Field Details
-
plugin
-
inputs
-
uuid
-
iterationNumber
protected final int iterationNumber -
pluginStateNotifications
protected final List<org.gcube.vremanagement.executor.plugin.PluginStateNotification> pluginStateNotifications -
ownerId
-
actualStateEvolution
protected org.gcube.vremanagement.executor.plugin.PluginStateEvolution actualStateEvolution
-
-
Constructor Details
-
RunnablePlugin
-
-
Method Details
-
run
public void run() -
getPlugin
- Returns:
- the plugin
-
getInputs
- Returns:
- the launchInputs
-
setPercentage
protected void setPercentage(Integer percentage) throws AlreadyInFinalStateException, InvalidPluginStateEvolutionException -
setState
public void setState(org.gcube.vremanagement.executor.plugin.PluginState pluginState) throws AlreadyInFinalStateException, InvalidPluginStateEvolutionException -
setState
public void setState(org.gcube.vremanagement.executor.plugin.PluginState pluginState, Exception e) throws AlreadyInFinalStateException, InvalidPluginStateEvolutionException -
setState
protected void setState(org.gcube.vremanagement.executor.plugin.PluginState pluginState, Integer percentage, Exception exception) throws AlreadyInFinalStateException, InvalidPluginStateEvolutionException It is up to the plugin to update the State of the Running Plugin using this facilities function.- Parameters:
pluginState- the new plugin state to setpercentage- the completion percentage (can be null)exception- the exception that caused the state change (can be null)- Throws:
AlreadyInFinalStateException- if the plugin is already in a final stateInvalidPluginStateEvolutionException- if the state transition is invalid
-
toString
-
stop
Stop the Plugin setting state toPluginState.STOPPED- Throws:
Exception
-