public interface ExternalTaskClientBuilder
A fluent builder to configure the Camunda client
| Modifier and Type | Method and Description |
|---|---|
ExternalTaskClientBuilder |
addInterceptor(ClientRequestInterceptor interceptor)
Adds an interceptor to change a request before it is sent to the http server.
|
ExternalTaskClientBuilder |
asyncResponseTimeout(long asyncResponseTimeout)
Asynchronous response (long polling) is enabled if a timeout is given.
|
ExternalTaskClientBuilder |
backoffStrategy(BackoffStrategy backoffStrategy)
Adds a custom strategy to the client for defining the org.camunda.bpm.client.backoff between two requests.
|
ExternalTaskClientBuilder |
baseUrl(String baseUrl)
Base url of the Camunda BPM Platform REST API.
|
ExternalTaskClient |
build()
Bootstraps the Camunda client
|
ExternalTaskClientBuilder |
dateFormat(String dateFormat)
Specifies the date format to de-/serialize date variables.
|
ExternalTaskClientBuilder |
defaultSerializationFormat(String defaultSerializationFormat)
Specifies the serialization format that is used to serialize objects when no specific
format is requested.
|
ExternalTaskClientBuilder |
disableAutoFetching()
Disables immediate fetching for external tasks after calling
build() to bootstrap the client. |
ExternalTaskClientBuilder |
disableBackoffStrategy()
Disables the client-side backoff strategy.
|
ExternalTaskClientBuilder |
lockDuration(long lockDuration) |
ExternalTaskClientBuilder |
maxTasks(int maxTasks)
Specifies the maximum amount of tasks that can be fetched within one request.
|
ExternalTaskClientBuilder |
usePriority(boolean usePriority)
Specifies whether tasks should be fetched based on their priority or arbitrarily.
|
ExternalTaskClientBuilder |
workerId(String workerId)
A custom worker id the Workflow Engine is aware of.
|
ExternalTaskClientBuilder baseUrl(String baseUrl)
baseUrl - of the Camunda BPM Platform REST APIExternalTaskClientBuilder workerId(String workerId)
workerId - the Workflow Engine is aware ofExternalTaskClientBuilder addInterceptor(ClientRequestInterceptor interceptor)
interceptor - which changes the requestExternalTaskClientBuilder maxTasks(int maxTasks)
maxTasks - which are supposed to be fetched within one requestExternalTaskClientBuilder usePriority(boolean usePriority)
true.usePriority - when fetching and locking tasksExternalTaskClientBuilder defaultSerializationFormat(String defaultSerializationFormat)
defaultSerializationFormat - serialization format to be usedExternalTaskClientBuilder dateFormat(String dateFormat)
dateFormat - date format to be usedExternalTaskClientBuilder asyncResponseTimeout(long asyncResponseTimeout)
asyncResponseTimeout - of fetched and locked external tasks in millisecondsExternalTaskClientBuilder lockDuration(long lockDuration)
lockDuration - ExternalTaskClientBuilder disableAutoFetching()
build() to bootstrap the client.
To start fetching ExternalTaskClient.start() must be called.ExternalTaskClientBuilder backoffStrategy(BackoffStrategy backoffStrategy)
ExponentialBackoffStrategy is applied.backoffStrategy - which realizes a custom org.camunda.bpm.client.backoff strategyExternalTaskClientBuilder disableBackoffStrategy()
backoffStrategy(org.camunda.bpm.client.backoff.BackoffStrategy) is ignored.
NOTE: Please bear in mind that disabling the client-side backoff can lead to heavy load situations on engine side.
To avoid this, please specify an appropriate asyncResponseTimeout(long).ExternalTaskClient build()
ExternalTaskClientException - Copyright © 2022. All rights reserved.