]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/server/client/SlcServerHttpClient.java
Use execDir to choose config and data dir when not forked.
[gpl/argeo-slc.git] / runtime / org.argeo.slc.server / src / main / java / org / argeo / slc / server / client / SlcServerHttpClient.java
1 package org.argeo.slc.server.client;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.argeo.slc.execution.ExecutionModuleDescriptor;
7 import org.argeo.slc.msg.ExecutionAnswer;
8 import org.argeo.slc.msg.event.SlcEvent;
9 import org.argeo.slc.process.RealizedFlow;
10 import org.argeo.slc.process.SlcExecution;
11 import org.argeo.slc.runtime.SlcAgentDescriptor;
12
13 /** Abstraction of the access to HTTP services of an SLC Server. */
14 public interface SlcServerHttpClient extends HttpServicesClient {
15 public final static String LIST_AGENTS = "listAgents.service";
16 public final static String IS_SERVER_READY = "isServerReady.service";
17 public final static String NEW_SLC_EXECUTION = "newSlcExecution.service";
18 public final static String LIST_SLC_EXECUTIONS = "listSlcExecutions.service";
19 public final static String GET_MODULE_DESCRIPTOR = "getExecutionDescriptor.service";
20 public final static String LIST_MODULE_DESCRIPTORS = "listModulesDescriptors.service";
21 public final static String LIST_RESULTS = "listResults.service";
22 public final static String ADD_EVENT_LISTENER = "addEventListener.service";
23 public final static String REMOVE_EVENT_LISTENER = "removeEventListener.service";
24 public final static String POLL_EVENT = "pollEvent.service";
25
26 /** Wait for the provided SlcExecution to be finished. */
27 public void waitForSlcExecutionFinished(SlcExecution slcExecution,
28 Long timeout);
29
30 /** Block until one of the registered event is finished. */
31 public SlcEvent pollEvent(Long timeout);
32
33 /** Register an event type. */
34 public ExecutionAnswer addEventListener(String eventType, String eventFilter);
35
36 /** Unregister an event type. */
37 public ExecutionAnswer removeEventListener(String eventType,
38 String eventFilter);
39
40 /** Wait for one agent to be available. */
41 public SlcAgentDescriptor waitForOneAgent();
42
43 /** Wait for the http server to be ready. */
44 public void waitForServerToBeReady();
45
46 /** Start an execution flow on the given agent. */
47 public SlcExecution startFlow(String agentId, RealizedFlow realizedFlow);
48
49 /** Assume one agent and one version per module. */
50 public SlcExecution startFlowDefault(String moduleName, String flowName,
51 Map<String, Object> args);
52
53 /** List execution modules descriptors. */
54 public List<ExecutionModuleDescriptor> listModuleDescriptors(String agentId);
55
56 /** Retrieve a single execution module descriptor. */
57 public ExecutionModuleDescriptor getModuleDescriptor(String agentId,
58 String moduleName, String version);
59
60 }