]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java
Unique launch
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / execution / ExecutionModulesManager.java
index 26890ad05a8c1870dce466c7d4cdf8863c140b1c..616dc502c74886bbe73575d1cd9aa928882675e9 100644 (file)
 package org.argeo.slc.execution;
 
 import java.util.List;
+import java.util.Map;
 
 import org.argeo.slc.deploy.ModulesManager;
 import org.argeo.slc.process.RealizedFlow;
-import org.argeo.slc.process.SlcExecution;
-import org.argeo.slc.process.SlcExecutionStep;
 
 /** Provides access to the execution modules */
 public interface ExecutionModulesManager extends ModulesManager {
+       /** Used to filter event notified to an execution notifier. */
+       public static String SLC_PROCESS_ID = "slc.process.id";
+
+       /** Unique launch module */
+       public static String UNIQUE_LAUNCH_MODULE_PROPERTY = "slc.launch.module";
+
+       /** Unique launch flow */
+       public static String UNIQUE_LAUNCH_FLOW_PROPERTY = "slc.launch.flow";
+
        /** @return a full fledged module descriptor. */
        public ExecutionModuleDescriptor getExecutionModuleDescriptor(
                        String moduleName, String version);
@@ -35,19 +43,25 @@ public interface ExecutionModulesManager extends ModulesManager {
         */
        public List<ExecutionModuleDescriptor> listExecutionModules();
 
-       /** Asynchronously prepares and executes an {@link SlcExecution} */
-       public void process(SlcExecution slcExecution);
-
-       /** The thread group to which all process threads will belong. */
-       public ThreadGroup getProcessesThreadGroup();
-
        /** Synchronously finds and executes an {@link ExecutionFlow}. */
        public void execute(RealizedFlow realizedFlow);
 
-       /** Notify of a status update status of the {@link SlcExecution} */
-       public void dispatchUpdateStatus(SlcExecution slcExecution,
+       /** Notify of a status update status of the {@link ExecutionProcess} */
+       public void dispatchUpdateStatus(ExecutionProcess process,
                        String oldStatus, String newStatus);
 
-       /** Notify that a step was added in an {@link SlcExecution} */
-       public void dispatchAddStep(SlcExecution slcExecution, SlcExecutionStep step);
+       /** Notify that a step was added in an {@link ExecutionProcess} */
+       public void dispatchAddSteps(ExecutionProcess process,
+                       List<ExecutionStep> steps);
+
+       /**
+        * Register a notifier which will be notified based on the provided
+        * properties.
+        */
+       public void registerProcessNotifier(ExecutionProcessNotifier notifier,
+                       Map<String, String> properties);
+
+       /** Unregisters a notifier */
+       public void unregisterProcessNotifier(ExecutionProcessNotifier notifier,
+                       Map<String, String> properties);
 }