]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/server/client/SlcServerHttpClient.java
Add license headers
[gpl/argeo-slc.git] / runtime / org.argeo.slc.launcher / src / main / java / org / argeo / slc / server / client / SlcServerHttpClient.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.slc.server.client;
18
19 import java.util.List;
20 import java.util.Map;
21
22 import org.argeo.slc.execution.ExecutionModuleDescriptor;
23 import org.argeo.slc.msg.ExecutionAnswer;
24 import org.argeo.slc.msg.event.SlcEvent;
25 import org.argeo.slc.process.RealizedFlow;
26 import org.argeo.slc.process.SlcExecution;
27 import org.argeo.slc.runtime.SlcAgentDescriptor;
28 import org.argeo.slc.server.HttpServices;
29
30 /** Abstraction of the access to HTTP services of an SLC Server. */
31 public interface SlcServerHttpClient extends HttpServicesClient,HttpServices {
32 /** Wait for the provided SlcExecution to be finished. */
33 public void waitForSlcExecutionFinished(SlcExecution slcExecution,
34 Long timeout);
35
36 /** Block until one of the registered event is finished. */
37 public SlcEvent pollEvent(Long timeout);
38
39 /** Register an event type. */
40 public ExecutionAnswer addEventListener(String eventType, String eventFilter);
41
42 /** Unregister an event type. */
43 public ExecutionAnswer removeEventListener(String eventType,
44 String eventFilter);
45
46 /** Wait for one agent to be available. */
47 public SlcAgentDescriptor waitForOneAgent();
48
49 /** Wait for the http server to be ready. */
50 public void waitForServerToBeReady();
51
52 /** Start an execution flow on the given agent. */
53 public SlcExecution startFlow(String agentId, RealizedFlow realizedFlow);
54
55 /** Assume one agent and one version per module. */
56 public SlcExecution startFlowDefault(String moduleName, String flowName,
57 Map<String, Object> args);
58
59 /** List execution modules descriptors. */
60 public List<ExecutionModuleDescriptor> listModuleDescriptors(String agentId);
61
62 /** Retrieve a single execution module descriptor. */
63 public ExecutionModuleDescriptor getModuleDescriptor(String agentId,
64 String moduleName, String version);
65
66 }