]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/server/client/HttpServicesClient.java
@update:79; First end-to-end integration test
[gpl/argeo-slc.git] / runtime / org.argeo.slc.server / src / main / java / org / argeo / slc / server / client / HttpServicesClient.java
1 package org.argeo.slc.server.client;
2
3 import java.util.Map;
4
5 import org.argeo.slc.Condition;
6
7 /** Abstraction of the access to HTTP services . */
8 public interface HttpServicesClient {
9 /** Call service, failing if it is not available. */
10 public <T> T callService(String path, Map<String, String> parameters);
11
12 /**
13 * Call service, waiting and retrying until the timeout is reached if it is
14 * not immediately available.
15 *
16 * @param path
17 * service path
18 * @param condition
19 * if not null, a condition to be applied on received object,
20 * keep trying if it returns false.
21 * @param timeout
22 * timeout after which an exception is thrown
23 */
24 public <T> T callServiceSafe(String path, Map<String, String> parameters,
25 Condition<T> condition, Long timeout);
26
27 }