diff --git a/pom.xml b/pom.xml index 2f4130b..51f7847 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ org.slf4j slf4j-api + provided com.thoughtworks.xstream diff --git a/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateEvolution.java b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateEvolution.java new file mode 100644 index 0000000..5a12b50 --- /dev/null +++ b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateEvolution.java @@ -0,0 +1,37 @@ +/** + * + */ +package org.gcube.vremanagement.executor.plugin; + +import java.util.UUID; + +/** + * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ + * + */ +public class PluginStateEvolution { + + protected final UUID uuid; + protected final int iteration; + protected final long timestamp; + protected final PluginDeclaration pluginDeclaration; + protected final PluginState pluginState; + + /** + * + * @param uuid the UUID which identify the current execution + * @param timestamp the time of the new {@link PluginState} + * @param pluginDeclaration the pluginDeclaration + * @param pluginState the {@link PluginState} value + * @throws Exception if fails + */ + public PluginStateEvolution(UUID uuid, int iteration, long timestamp, + PluginDeclaration pluginDeclaration, PluginState pluginState) { + this.uuid = uuid; + this.iteration = iteration; + this.timestamp = timestamp; + this.pluginDeclaration = pluginDeclaration; + this.pluginState = pluginState; + } + +} diff --git a/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateNotification.java b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateNotification.java index 13d068b..59da415 100644 --- a/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateNotification.java +++ b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginStateNotification.java @@ -3,7 +3,6 @@ */ package org.gcube.vremanagement.executor.plugin; -import java.util.UUID; /** * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ @@ -11,16 +10,11 @@ import java.util.UUID; */ public interface PluginStateNotification { - /** * Persist the new state of plugin - * @param uuid the UUID which identify the current execution - * @param timestamp the time of the new {@link PluginState} - * @param pluginDeclaration the pluginDeclaration - * @param pluginState the {@link PluginState} value + * @param pluginStateEvolution the PluginStateEvolution record to persist * @throws Exception if fails */ - public abstract void pluginStateEvolution(UUID uuid, int lauchedtimes, - long timestamp, String pluginName, PluginState pluginState) + public abstract void pluginStateEvolution(PluginStateEvolution pluginStateEvolution) throws Exception; }