Package com.evolveum.midpoint.task.api
Interface ClusterExecutionHelper
-
public interface ClusterExecutionHelper
Helps with the intra-cluster remote code execution. Generally, execute(..) methods prepare a configured WebClient (URL, authentication, ...) and execute specified client code on it. The client code is responsible for setting the correct path (e.g. "/scheduler/information"), executing specified operation (e.g. GET) and interpreting the result. See callers of these methods for sample usage. Other helper methods will probably appear here as well.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(NodeType node, BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult)
Executes operation on a specified remote node (by node object).void
execute(String nodeOid, BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult)
Executes operation on a specified remote node (by OID).void
execute(BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult)
Executes operation on all cluster nodes except for the current one.<T> T
extractResult(javax.ws.rs.core.Response response, Class<T> expectedClass)
Extracts the result from the REST response.
-
-
-
Method Detail
-
execute
void execute(@NotNull String nodeOid, @NotNull BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult) throws SchemaException, ObjectNotFoundException
Executes operation on a specified remote node (by OID).
-
execute
void execute(@NotNull NodeType node, @NotNull BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult) throws SchemaException
Executes operation on a specified remote node (by node object).- Throws:
SchemaException
-
execute
void execute(@NotNull BiConsumer<org.apache.cxf.jaxrs.client.WebClient,OperationResult> code, ClusterExecutionOptions options, String context, OperationResult parentResult)
Executes operation on all cluster nodes except for the current one.
-
extractResult
<T> T extractResult(javax.ws.rs.core.Response response, Class<T> expectedClass) throws SchemaException
Extracts the result from the REST response.- Throws:
SchemaException
-
-