Package io.camunda.zeebe.client.impl
Class ZeebeClientBuilderImpl
java.lang.Object
io.camunda.zeebe.client.impl.ZeebeClientBuilderImpl
- All Implemented Interfaces:
ZeebeClientBuilder,ZeebeClientConfiguration
public final class ZeebeClientBuilderImpl
extends Object
implements ZeebeClientBuilder, ZeebeClientConfiguration
-
Field Summary
Fields -
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.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.gatewayAddress(String gatewayAddress) intList<io.grpc.ClientInterceptor>intbooleanTime interval between keep alive messages sent to the gateway.numJobWorkerExecutionThreads(int numSubscriptionThreads) overrideAuthority(String authority) Overrides the authority used with TLS virtual hosting.toString()Use a plaintext connection between the client and the gateway.withInterceptors(io.grpc.ClientInterceptor... interceptors) withJsonMapper(JsonMapper jsonMapper) withProperties(Properties properties) Sets all the properties from aPropertiesobject.
-
Field Details
-
PLAINTEXT_CONNECTION_VAR
- See Also:
-
CA_CERTIFICATE_VAR
- See Also:
-
KEEP_ALIVE_VAR
- See Also:
-
OVERRIDE_AUTHORITY_VAR
- See Also:
-
DEFAULT_GATEWAY_ADDRESS
- See Also:
-
-
Constructor Details
-
ZeebeClientBuilderImpl
public ZeebeClientBuilderImpl()
-
-
Method Details
-
getGatewayAddress
- Specified by:
getGatewayAddressin interfaceZeebeClientConfiguration- See Also:
-
getNumJobWorkerExecutionThreads
public int getNumJobWorkerExecutionThreads()- Specified by:
getNumJobWorkerExecutionThreadsin interfaceZeebeClientConfiguration- See Also:
-
getDefaultJobWorkerMaxJobsActive
public int getDefaultJobWorkerMaxJobsActive()- Specified by:
getDefaultJobWorkerMaxJobsActivein interfaceZeebeClientConfiguration- See Also:
-
getDefaultJobWorkerName
- Specified by:
getDefaultJobWorkerNamein interfaceZeebeClientConfiguration- See Also:
-
getDefaultJobTimeout
- Specified by:
getDefaultJobTimeoutin interfaceZeebeClientConfiguration- See Also:
-
getDefaultJobPollInterval
- Specified by:
getDefaultJobPollIntervalin interfaceZeebeClientConfiguration- See Also:
-
getDefaultMessageTimeToLive
- Specified by:
getDefaultMessageTimeToLivein interfaceZeebeClientConfiguration- See Also:
-
getDefaultRequestTimeout
- Specified by:
getDefaultRequestTimeoutin interfaceZeebeClientConfiguration- See Also:
-
isPlaintextConnectionEnabled
public boolean isPlaintextConnectionEnabled()- Specified by:
isPlaintextConnectionEnabledin interfaceZeebeClientConfiguration- See Also:
-
getCaCertificatePath
- Specified by:
getCaCertificatePathin interfaceZeebeClientConfiguration- See Also:
-
getCredentialsProvider
- Specified by:
getCredentialsProviderin interfaceZeebeClientConfiguration- See Also:
-
getKeepAlive
- Specified by:
getKeepAlivein interfaceZeebeClientConfiguration- See Also:
-
getInterceptors
- Specified by:
getInterceptorsin interfaceZeebeClientConfiguration
-
getJsonMapper
- Specified by:
getJsonMapperin interfaceZeebeClientConfiguration- See Also:
-
getOverrideAuthority
- Specified by:
getOverrideAuthorityin interfaceZeebeClientConfiguration- See Also:
-
withProperties
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
- 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.
-
defaultJobWorkerMaxJobsActive
- Specified by:
defaultJobWorkerMaxJobsActivein interfaceZeebeClientBuilder- Parameters:
maxJobsActive- Default value forJobWorkerBuilderStep1.JobWorkerBuilderStep3.maxJobsActive(int). Default value is 32.
-
numJobWorkerExecutionThreads
- Specified by:
numJobWorkerExecutionThreadsin interfaceZeebeClientBuilder- Parameters:
numSubscriptionThreads- The number of threads for invocation of job workers. Setting this value to 0 effectively disables subscriptions and workers. Default value is 1.
-
defaultJobWorkerName
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
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
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
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
Description copied from interface:ZeebeClientBuilderThe request timeout used if not overridden by the command. Default is 20 seconds.- Specified by:
defaultRequestTimeoutin interfaceZeebeClientBuilder
-
usePlaintext
Description copied from interface:ZeebeClientBuilderUse a plaintext connection between the client and the gateway.- Specified by:
usePlaintextin interfaceZeebeClientBuilder
-
caCertificatePath
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
Description copied from interface:ZeebeClientBuilderA customCredentialsProviderwhich will be used to apply authentication credentials to requests.- Specified by:
credentialsProviderin interfaceZeebeClientBuilder
-
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
- Specified by:
withInterceptorsin interfaceZeebeClientBuilder
-
withJsonMapper
- 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
-
build
- Specified by:
buildin interfaceZeebeClientBuilder- Returns:
- a new
ZeebeClientwith the provided configuration options.
-
toString
-