1 package org
.argeo
.slc
.server
.client
;
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
;
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";
26 /** Wait for the provided SlcExecution to be finished. */
27 public void waitForSlcExecutionFinished(SlcExecution slcExecution
,
30 /** Block until one of the registered event is finished. */
31 public SlcEvent
pollEvent(Long timeout
);
33 /** Register an event type. */
34 public ExecutionAnswer
addEventListener(String eventType
, String eventFilter
);
36 /** Unregister an event type. */
37 public ExecutionAnswer
removeEventListener(String eventType
,
40 /** Wait for one agent to be available. */
41 public SlcAgentDescriptor
waitForOneAgent();
43 /** Wait for the http server to be ready. */
44 public void waitForServerToBeReady();
46 /** Start an execution flow on the given agent. */
47 public SlcExecution
startFlow(String agentId
, RealizedFlow realizedFlow
);
49 /** Assume one agent and one version per module. */
50 public SlcExecution
startFlowDefault(String moduleName
, String flowName
,
51 Map
<String
, Object
> args
);
53 /** List execution modules descriptors. */
54 public List
<ExecutionModuleDescriptor
> listModuleDescriptors(String agentId
);
56 /** Retrieve a single execution module descriptor. */
57 public ExecutionModuleDescriptor
getModuleDescriptor(String agentId
,
58 String moduleName
, String version
);