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 Modifier and Type Field Description static StringCA_CERTIFICATE_VARstatic StringDEFAULT_GATEWAY_ADDRESSstatic StringKEEP_ALIVE_VARstatic StringPLAINTEXT_CONNECTION_VAR
-
Constructor Summary
Constructors Constructor Description ZeebeClientBuilderImpl()
-
Method Summary
-
-
-
Field Detail
-
PLAINTEXT_CONNECTION_VAR
public static final String PLAINTEXT_CONNECTION_VAR
- See Also:
- Constant Field Values
-
CA_CERTIFICATE_VAR
public static final String CA_CERTIFICATE_VAR
- See Also:
- Constant Field Values
-
KEEP_ALIVE_VAR
public static final String KEEP_ALIVE_VAR
- See Also:
- Constant Field Values
-
DEFAULT_GATEWAY_ADDRESS
public static final String DEFAULT_GATEWAY_ADDRESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGatewayAddress
public String getGatewayAddress()
- Specified by:
getGatewayAddressin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.gatewayAddress(String)
-
getNumJobWorkerExecutionThreads
public int getNumJobWorkerExecutionThreads()
- Specified by:
getNumJobWorkerExecutionThreadsin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.numJobWorkerExecutionThreads(int)
-
getDefaultJobWorkerMaxJobsActive
public int getDefaultJobWorkerMaxJobsActive()
- Specified by:
getDefaultJobWorkerMaxJobsActivein interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultJobWorkerMaxJobsActive(int)
-
getDefaultJobWorkerName
public String getDefaultJobWorkerName()
- Specified by:
getDefaultJobWorkerNamein interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultJobWorkerName(String)
-
getDefaultJobTimeout
public Duration getDefaultJobTimeout()
- Specified by:
getDefaultJobTimeoutin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultJobTimeout(Duration)
-
getDefaultJobPollInterval
public Duration getDefaultJobPollInterval()
- Specified by:
getDefaultJobPollIntervalin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultJobPollInterval(Duration)
-
getDefaultMessageTimeToLive
public Duration getDefaultMessageTimeToLive()
- Specified by:
getDefaultMessageTimeToLivein interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultMessageTimeToLive(Duration)
-
getDefaultRequestTimeout
public Duration getDefaultRequestTimeout()
- Specified by:
getDefaultRequestTimeoutin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.defaultRequestTimeout(Duration)
-
isPlaintextConnectionEnabled
public boolean isPlaintextConnectionEnabled()
- Specified by:
isPlaintextConnectionEnabledin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.usePlaintext()
-
getCaCertificatePath
public String getCaCertificatePath()
- Specified by:
getCaCertificatePathin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.caCertificatePath(String)
-
getCredentialsProvider
public CredentialsProvider getCredentialsProvider()
- Specified by:
getCredentialsProviderin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.credentialsProvider(CredentialsProvider)
-
getKeepAlive
public Duration getKeepAlive()
- Specified by:
getKeepAlivein interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.keepAlive(Duration)
-
getInterceptors
public List<io.grpc.ClientInterceptor> getInterceptors()
- Specified by:
getInterceptorsin interfaceZeebeClientConfiguration
-
getJsonMapper
public JsonMapper getJsonMapper()
- Specified by:
getJsonMapperin interfaceZeebeClientConfiguration- See Also:
ZeebeClientBuilder.withJsonMapper(io.camunda.zeebe.client.api.JsonMapper)
-
withProperties
public ZeebeClientBuilder 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
-
gatewayAddress
public ZeebeClientBuilder 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.
-
defaultJobWorkerMaxJobsActive
public ZeebeClientBuilder defaultJobWorkerMaxJobsActive(int maxJobsActive)
- Specified by:
defaultJobWorkerMaxJobsActivein interfaceZeebeClientBuilder- Parameters:
maxJobsActive- Default value forJobWorkerBuilderStep1.JobWorkerBuilderStep3.maxJobsActive(int). Default value is 32.
-
numJobWorkerExecutionThreads
public ZeebeClientBuilder numJobWorkerExecutionThreads(int numSubscriptionThreads)
- 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
public ZeebeClientBuilder 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 ZeebeClientBuilder 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 ZeebeClientBuilder 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 ZeebeClientBuilder 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 ZeebeClientBuilder defaultRequestTimeout(Duration requestTimeout)
Description copied from interface:ZeebeClientBuilderThe request timeout used if not overridden by the command. Default is 20 seconds.- Specified by:
defaultRequestTimeoutin interfaceZeebeClientBuilder
-
usePlaintext
public ZeebeClientBuilder usePlaintext()
Description copied from interface:ZeebeClientBuilderUse a plaintext connection between the client and the gateway.- Specified by:
usePlaintextin interfaceZeebeClientBuilder
-
caCertificatePath
public ZeebeClientBuilder 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 ZeebeClientBuilder credentialsProvider(CredentialsProvider credentialsProvider)
Description copied from interface:ZeebeClientBuilderA customCredentialsProviderwhich will be used to apply authentication credentials to requests.- Specified by:
credentialsProviderin interfaceZeebeClientBuilder
-
keepAlive
public ZeebeClientBuilder 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 ZeebeClientBuilder withInterceptors(io.grpc.ClientInterceptor... interceptors)
- Specified by:
withInterceptorsin interfaceZeebeClientBuilder
-
withJsonMapper
public ZeebeClientBuilder withJsonMapper(JsonMapper jsonMapper)
- Specified by:
withJsonMapperin interfaceZeebeClientBuilder
-
build
public ZeebeClient build()
- Specified by:
buildin interfaceZeebeClientBuilder- Returns:
- a new
ZeebeClientwith the provided configuration options.
-
-