Class FailJobCommandImpl
- All Implemented Interfaces:
CommandWithCommunicationApiStep<FailJobCommandStep1>,CommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>,FailJobCommandStep1,FailJobCommandStep1.FailJobCommandStep2,FinalCommandStep<FailJobResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.api.command.FailJobCommandStep1
FailJobCommandStep1.FailJobCommandStep2 -
Field Summary
Fields inherited from class io.camunda.client.impl.command.CommandWithVariables
objectMapper -
Constructor Summary
ConstructorsConstructorDescriptionFailJobCommandImpl(GatewayGrpc.GatewayStub asyncStub, JsonMapper jsonMapper, long key, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc) -
Method Summary
Modifier and TypeMethodDescriptionerrorMessage(String errorMsg) Provide an error message describing the reason for the job failure.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.retries(int retries) Set the remaining retries of this job.retryBackoff(Duration backoffTimeout) Set the backoff timeout for failing this job.send()Sends the command to the Camunda gateway.setVariablesInternal(String variables) 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.Methods inherited from class io.camunda.client.impl.command.CommandWithVariables
variable, variables, variables, variables, variablesMethods 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.FailJobCommandStep1.FailJobCommandStep2
variable, variables, variables, variables, variablesMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
FailJobCommandImpl
public FailJobCommandImpl(GatewayGrpc.GatewayStub asyncStub, JsonMapper jsonMapper, long key, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc)
-
-
Method Details
-
retries
Description copied from interface:FailJobCommandStep1Set the remaining retries of this job.If the retries are greater than zero then this job will be picked up again by a job subscription. Otherwise, an incident is created for this job.
- Specified by:
retriesin interfaceFailJobCommandStep1- Parameters:
retries- the remaining retries of this job (e.g. "jobEvent.getRetries() - 1")- Returns:
- the builder for this command. Call
to complete the command and send it to the broker.
invalid reference
#send()
-
retryBackoff
Description copied from interface:FailJobCommandStep1.FailJobCommandStep2Set the backoff timeout for failing this job.If the backoff timeout is greater than zero and retries are greater than zero then this job will be picked up again after the given backoff timeout is expired.
- Specified by:
retryBackoffin interfaceFailJobCommandStep1.FailJobCommandStep2- Parameters:
backoffTimeout- the backoff timeout of this job- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send * it to the broker.
-
errorMessage
Description copied from interface:FailJobCommandStep1.FailJobCommandStep2Provide an error message describing the reason for the job failure. If failing the job creates an incident, this error message will be used as incident message.- Specified by:
errorMessagein interfaceFailJobCommandStep1.FailJobCommandStep2- Parameters:
errorMsg- error message to be attached to the failed job- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-
setVariablesInternal
- Specified by:
setVariablesInternalin classCommandWithVariables<FailJobCommandStep1.FailJobCommandStep2>
-
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<FailJobResponse>- 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<FailJobResponse>- Returns:
- a future tracking state of success/failure of the command.
-
useRest
Description copied from interface:CommandWithCommunicationApiStepExperimental: 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 Camunda, and already wants to use this API during its development. As support for REST is added to Camunda, 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
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useRestin interfaceCommandWithCommunicationApiStep<FailJobCommandStep1>- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStepExperimental: 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 Camunda, 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
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useGrpcin interfaceCommandWithCommunicationApiStep<FailJobCommandStep1>- Returns:
- the configured command
-