Package io.camunda.zeebe.client.impl
Class ZeebeClientCloudBuilderImpl
java.lang.Object
io.camunda.zeebe.client.impl.ZeebeClientCloudBuilderImpl
- All Implemented Interfaces:
ZeebeClientBuilder,ZeebeClientCloudBuilderStep1,ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2,ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3,ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4
public class ZeebeClientCloudBuilderImpl
extends Object
implements ZeebeClientCloudBuilderStep1, ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2, ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3, ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.client.ZeebeClientCloudBuilderStep1
ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2Nested classes/interfaces inherited from interface io.camunda.zeebe.client.ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2
ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3Nested classes/interfaces inherited from interface io.camunda.zeebe.client.ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3
ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyEnvironmentVariableOverrides(boolean applyEnvironmentVariableOverrides) Allows to disable the mechanism to override some properties by ENVIRONMENT VARIABLES.build()caCertificatePath(String certificatePath) Path to a root CA certificate to be used instead of the certificate in the default default store.credentialsProvider(CredentialsProvider credentialsProvider) A customCredentialsProviderwhich will be used to apply authentication credentials to requests.defaultJobPollInterval(Duration pollInterval) The interval which a job worker is periodically polling for new jobs.defaultJobTimeout(Duration timeout) The timeout which is used when none is provided for a job worker.defaultJobWorkerMaxJobsActive(int maxJobsActive) defaultJobWorkerName(String workerName) The name of the worker which is used when none is set for a job worker.defaultJobWorkerStreamEnabled(boolean streamEnabled) A custom streamEnabled allows the client to use job stream instead of job poll.defaultJobWorkerTenantIds(List<String> tenantIds) defaultMessageTimeToLive(Duration timeToLive) The time-to-live which is used when none is provided for a message.defaultRequestTimeout(Duration requestTimeout) The request timeout used if not overridden by the command.defaultTenantId(String tenantId) gatewayAddress(String gatewayAddress) jobWorkerExecutor(ScheduledExecutorService executor, boolean takeOwnership) Allows passing a custom executor service that will be shared by all job workers created via this client.Time interval between keep alive messages sent to the gateway.maxMessageSize(int maxMessageSize) A custom maxMessageSize allows the client to receive larger or smaller responses from Zeebe.numJobWorkerExecutionThreads(int numThreads) overrideAuthority(String authority) Overrides the authority used with TLS virtual hosting.toString()Use a plaintext connection between the client and the gateway.withClientId(String clientId) Sets the client id that will be used to authenticate against the Camunda Cloud cluster.withClientSecret(String clientSecret) Sets the client secret that will be used to authenticate against the Camunda Cloud cluster.withClusterId(String clusterId) Sets the cluster id of the Camunda Cloud cluster.withInterceptors(io.grpc.ClientInterceptor... interceptor) withJsonMapper(JsonMapper jsonMapper) withProperties(Properties properties) Sets all the properties from aPropertiesobject.withRegion(String region) Sets the region of the Camunda Cloud cluster.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.client.ZeebeClientBuilder
jobWorkerExecutor
-
Constructor Details
-
ZeebeClientCloudBuilderImpl
public ZeebeClientCloudBuilderImpl()
-
-
Method Details
-
withClusterId
Description copied from interface:ZeebeClientCloudBuilderStep1Sets the cluster id of the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClusterIdin interfaceZeebeClientCloudBuilderStep1- Parameters:
clusterId- cluster id of the Camunda Cloud cluster.
-
withClientId
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3 withClientId(String clientId) Description copied from interface:ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2Sets the client id that will be used to authenticate against the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClientIdin interfaceZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2- Parameters:
clientId- client id that will be used in the authentication.
-
withClientSecret
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 withClientSecret(String clientSecret) Description copied from interface:ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3Sets the client secret that will be used to authenticate against the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClientSecretin interfaceZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3- Parameters:
clientSecret- client secret that will be used in the authentication.
-
withRegion
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 withRegion(String region) Description copied from interface:ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4Sets the region of the Camunda Cloud cluster. Default is 'bru-2'.- Specified by:
withRegionin interfaceZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4- Parameters:
region- region of the Camunda Cloud cluster
-
withProperties
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 withProperties(Properties properties) Description copied from interface:ZeebeClientBuilderSets all the properties from aPropertiesobject. Can be used to configure the client from a properties file.See
ClientPropertiesfor valid property names.- Specified by:
withPropertiesin interfaceZeebeClientBuilder
-
applyEnvironmentVariableOverrides
public ZeebeClientBuilder applyEnvironmentVariableOverrides(boolean applyEnvironmentVariableOverrides) Description copied from interface:ZeebeClientBuilderAllows to disable the mechanism to override some properties by ENVIRONMENT VARIABLES. This is useful if a client shall be constructed for test cases or in an environment that wants to fully control properties (like Spring Boot).The default value is
true.- Specified by:
applyEnvironmentVariableOverridesin interfaceZeebeClientBuilder
-
gatewayAddress
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 gatewayAddress(String gatewayAddress) - Specified by:
gatewayAddressin interfaceZeebeClientBuilder- Parameters:
gatewayAddress- the IP socket address of a gateway that the client can initially connect to. Must be in formathost:port. The default value is0.0.0.0:26500.
-
defaultTenantId
@ExperimentalApi("https://github.com/camunda/zeebe/issues/14106") public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultTenantId(String tenantId) - Specified by:
defaultTenantIdin interfaceZeebeClientBuilder- Parameters:
tenantId- the tenant identifier which is used for tenant-aware commands when no tenant identifier is set. The default value isCommandWithTenantStep.DEFAULT_TENANT_IDENTIFIER.
-
defaultJobWorkerTenantIds
@ExperimentalApi("https://github.com/camunda/zeebe/issues/14106") public ZeebeClientBuilder defaultJobWorkerTenantIds(List<String> tenantIds) - Specified by:
defaultJobWorkerTenantIdsin interfaceZeebeClientBuilder- Parameters:
tenantIds- the tenant identifiers which are used for job-activation commands when no tenant identifiers are set. The default value contains onlyCommandWithTenantStep.DEFAULT_TENANT_IDENTIFIER.
-
defaultJobWorkerMaxJobsActive
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultJobWorkerMaxJobsActive(int maxJobsActive) - Specified by:
defaultJobWorkerMaxJobsActivein interfaceZeebeClientBuilder- Parameters:
maxJobsActive- Default value forJobWorkerBuilderStep1.JobWorkerBuilderStep3.maxJobsActive(int). Default value is 32.
-
numJobWorkerExecutionThreads
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 numJobWorkerExecutionThreads(int numThreads) - Specified by:
numJobWorkerExecutionThreadsin interfaceZeebeClientBuilder- Parameters:
numThreads- The number of threads for invocation of job workers. Setting this value to 0 effectively disables subscriptions and workers. Default value is 1.
-
jobWorkerExecutor
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 jobWorkerExecutor(ScheduledExecutorService executor, boolean takeOwnership) Description copied from interface:ZeebeClientBuilderAllows passing a custom executor service that will be shared by all job workers created via this client.Polling and handling jobs (e.g. via
JobHandlerwill all be invoked on this executor.When non-null, this setting override
ZeebeClientBuilder.numJobWorkerExecutionThreads(int).- Specified by:
jobWorkerExecutorin interfaceZeebeClientBuilder- Parameters:
executor- an executor service to use when invoking job workerstakeOwnership- if true, the executor will be closed when the client is closed. otherwise, it's up to the caller to manage its lifecycle
-
defaultJobWorkerName
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultJobWorkerName(String workerName) Description copied from interface:ZeebeClientBuilderThe name of the worker which is used when none is set for a job worker. Default is 'default'.- Specified by:
defaultJobWorkerNamein interfaceZeebeClientBuilder
-
defaultJobTimeout
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultJobTimeout(Duration timeout) Description copied from interface:ZeebeClientBuilderThe timeout which is used when none is provided for a job worker. Default is 5 minutes.- Specified by:
defaultJobTimeoutin interfaceZeebeClientBuilder
-
defaultJobPollInterval
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultJobPollInterval(Duration pollInterval) Description copied from interface:ZeebeClientBuilderThe interval which a job worker is periodically polling for new jobs. Default is 100 milliseconds.- Specified by:
defaultJobPollIntervalin interfaceZeebeClientBuilder
-
defaultMessageTimeToLive
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultMessageTimeToLive(Duration timeToLive) Description copied from interface:ZeebeClientBuilderThe time-to-live which is used when none is provided for a message. Default is 1 hour.- Specified by:
defaultMessageTimeToLivein interfaceZeebeClientBuilder
-
defaultRequestTimeout
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 defaultRequestTimeout(Duration requestTimeout) Description copied from interface:ZeebeClientBuilderThe request timeout used if not overridden by the command. Default is 10 seconds.- Specified by:
defaultRequestTimeoutin interfaceZeebeClientBuilder
-
usePlaintext
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 usePlaintext()Description copied from interface:ZeebeClientBuilderUse a plaintext connection between the client and the gateway.- Specified by:
usePlaintextin interfaceZeebeClientBuilder
-
caCertificatePath
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 caCertificatePath(String certificatePath) Description copied from interface:ZeebeClientBuilderPath to a root CA certificate to be used instead of the certificate in the default default store.- Specified by:
caCertificatePathin interfaceZeebeClientBuilder
-
credentialsProvider
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 credentialsProvider(CredentialsProvider credentialsProvider) Description copied from interface:ZeebeClientBuilderA customCredentialsProviderwhich will be used to apply authentication credentials to requests.- Specified by:
credentialsProviderin interfaceZeebeClientBuilder
-
keepAlive
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 keepAlive(Duration keepAlive) Description copied from interface:ZeebeClientBuilderTime interval between keep alive messages sent to the gateway. The default is 45 seconds.- Specified by:
keepAlivein interfaceZeebeClientBuilder
-
withInterceptors
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 withInterceptors(io.grpc.ClientInterceptor... interceptor) - Specified by:
withInterceptorsin interfaceZeebeClientBuilder
-
withJsonMapper
public ZeebeClientCloudBuilderStep1.ZeebeClientCloudBuilderStep2.ZeebeClientCloudBuilderStep3.ZeebeClientCloudBuilderStep4 withJsonMapper(JsonMapper jsonMapper) - Specified by:
withJsonMapperin interfaceZeebeClientBuilder
-
overrideAuthority
Description copied from interface:ZeebeClientBuilderOverrides the authority used with TLS virtual hosting. Specifically, to override hostname verification in the TLS handshake. It does not change what host is actually connected to.This method is intended for testing, but may safely be used outside of tests as an alternative to DNS overrides.
This setting does nothing if a
plaintextconnection is used.- Specified by:
overrideAuthorityin interfaceZeebeClientBuilder- Parameters:
authority- The alternative authority to use, commonly in the formhostorhost:port
-
maxMessageSize
Description copied from interface:ZeebeClientBuilderA custom maxMessageSize allows the client to receive larger or smaller responses from Zeebe. Technically, it specifies the maxInboundMessageSize of the gRPC channel. The default is 4194304 = 4MB.- Specified by:
maxMessageSizein interfaceZeebeClientBuilder
-
defaultJobWorkerStreamEnabled
Description copied from interface:ZeebeClientBuilderA custom streamEnabled allows the client to use job stream instead of job poll. The default value is set as enabled.- Specified by:
defaultJobWorkerStreamEnabledin interfaceZeebeClientBuilder
-
build
- Specified by:
buildin interfaceZeebeClientBuilder- Returns:
- a new
ZeebeClientwith the provided configuration options.
-
toString
-