Package io.camunda.client.impl.command
Class CancelProcessInstanceCommandImpl
java.lang.Object
io.camunda.client.impl.command.CancelProcessInstanceCommandImpl
- All Implemented Interfaces:
CancelProcessInstanceCommandStep1,CommandWithCommunicationApiStep<CancelProcessInstanceCommandStep1>,CommandWithOperationReferenceStep<CancelProcessInstanceCommandStep1>,FinalCommandStep<CancelProcessInstanceResponse>
public final class CancelProcessInstanceCommandImpl
extends Object
implements CancelProcessInstanceCommandStep1
-
Constructor Summary
ConstructorsConstructorDescriptionCancelProcessInstanceCommandImpl(io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub asyncStub, long processInstanceKey, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, CamundaClientConfiguration config, JsonMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionoperationReference(long operationReference) Set the Operation Reference.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.send()Sends the command to the Camunda gateway.useGrpc()Sets gRPC as the communication API for this command.useRest()Sets REST as the communication API for this command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
CancelProcessInstanceCommandImpl
public CancelProcessInstanceCommandImpl(io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub asyncStub, long processInstanceKey, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, CamundaClientConfiguration config, JsonMapper jsonMapper)
-
-
Method Details
-
requestTimeout
Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingCamundaClientBuilder.defaultRequestTimeout(Duration).- Specified by:
requestTimeoutin interfaceFinalCommandStep<CancelProcessInstanceResponse>- Parameters:
requestTimeout- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStepSends the command to the Camunda gateway. This operation is asynchronous. In case of success, the future returns the event that was generated by the Camunda gateway in response to the command.Call
CamundaFuture.join()to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();- Specified by:
sendin interfaceFinalCommandStep<CancelProcessInstanceResponse>- Returns:
- a future tracking state of success/failure of the command.
-
sendGrpcRequest
-
operationReference
Description copied from interface:CommandWithOperationReferenceStepSet the Operation Reference.This is a key chosen by the user and will be part of all records resulted from this operation
- Specified by:
operationReferencein interfaceCommandWithOperationReferenceStep<CancelProcessInstanceCommandStep1>- Parameters:
operationReference- a reference key chosen by the user and will be part of all records resulted from this operation- Returns:
- the builder for this command with the operation reference specified
-
useRest
Description copied from interface:CommandWithCommunicationApiStepSets REST as the communication API for this command. If this command doesn't support communication over REST, it simply returns the command builder instance unchanged. The default communication API can be configured usingCamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useRestin interfaceCommandWithCommunicationApiStep<CancelProcessInstanceCommandStep1>- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStepSets gRPC as the communication API for this command. If this command doesn't support communication over gRPC, it simply returns the command builder instance unchanged. The default communication API can be configured usingCamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useGrpcin interfaceCommandWithCommunicationApiStep<CancelProcessInstanceCommandStep1>- Returns:
- the configured command
-