]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.api/src/org/argeo/slc/execution/SlcAgent.java
Upgrade all classpaths to Java 11
[gpl/argeo-slc.git] / org.argeo.slc.api / src / org / argeo / slc / execution / SlcAgent.java
1 package org.argeo.slc.execution;
2
3 import java.net.URI;
4 import java.util.List;
5
6 /**
7 * A local agent can run SLC processes. It is responsible for creating their
8 * threads and integrating them with various UIs. It typically wraps
9 * {@link ExecutionModulesManager} which is used to run flows synchronously at a
10 * lower level.
11 */
12 public interface SlcAgent {
13 /** Agent unique identifier */
14 public String getAgentUuid();
15
16 /** Execute / take part to this process */
17 public void process(ExecutionProcess process);
18
19 /**
20 * Asynchronously processes the flows defined as URIs, or interpret a single
21 * UUID URN as a scheduled or template process.
22 *
23 * @return the UUID of the process launched.
24 */
25 public String process(List<URI> uris);
26
27 /** Kills this process */
28 public void kill(String processUuid);
29
30 /**
31 * Wait for this process to finish. returns immediately if it does not
32 * exist.
33 *
34 * @param millis
35 * can be null
36 */
37 public void waitFor(String processUuid, Long millis);
38
39 /**
40 * Describe all the flows provided by this execution module. Typically
41 * called in order to build a realized flow.
42 */
43 public ExecutionModuleDescriptor getExecutionModuleDescriptor(
44 String moduleName, String version);
45
46 /** List all execution modules which can be processed by this agent. */
47 public List<ExecutionModuleDescriptor> listExecutionModuleDescriptors();
48
49 /** @return true if still alive. */
50 public boolean ping();
51 }