Class CancelProcessInstanceCommandImpl
java.lang.Object
io.camunda.zeebe.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
(GatewayGrpc.GatewayStub asyncStub, long processInstanceKey, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, ZeebeClientConfiguration 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 Zeebe broker.useGrpc()
Experimental: This method is under development, and as such using it may have no effect on the command builder when called.useRest()
Experimental: This method is under development, and as such using it may have no effect on the command builder when called.
-
Constructor Details
-
CancelProcessInstanceCommandImpl
public CancelProcessInstanceCommandImpl(GatewayGrpc.GatewayStub asyncStub, long processInstanceKey, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, ZeebeClientConfiguration config, JsonMapper jsonMapper)
-
-
Method Details
-
requestTimeout
Description copied from interface:FinalCommandStep
Sets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.defaultRequestTimeout(Duration)
.- Specified by:
requestTimeout
in interfaceFinalCommandStep<CancelProcessInstanceResponse>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStep
Sends the command to the Zeebe broker. This operation is asynchronous. In case of success, the future returns the event that was generated by the Zeebe broker in response to the command.Call
ZeebeFuture.join()
to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<CancelProcessInstanceResponse>
- Returns:
- a future tracking state of success/failure of the command.
-
sendGrpcRequest
-
operationReference
Description copied from interface:CommandWithOperationReferenceStep
Set the Operation Reference.This is a key chosen by the user and will be part of all records resulted from this operation
- Specified by:
operationReference
in 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:CommandWithCommunicationApiStep
Experimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Zeebe, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets 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 using
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useRest
in interfaceCommandWithCommunicationApiStep<CancelProcessInstanceCommandStep1>
- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStep
Experimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Zeebe, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets 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 using
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useGrpc
in interfaceCommandWithCommunicationApiStep<CancelProcessInstanceCommandStep1>
- Returns:
- the configured command
-