Class CamundaClientCloudBuilderImpl
- All Implemented Interfaces:
CamundaClientBuilder,CamundaClientCloudBuilderStep1,CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2,CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3,CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4,CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.CamundaClientCloudBuilderStep1
CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2Nested classes/interfaces inherited from interface io.camunda.client.CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2
CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3Nested classes/interfaces inherited from interface io.camunda.client.CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3
CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4Nested classes/interfaces inherited from interface io.camunda.client.CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4
CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5 -
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.defaultRequestTimeoutOffset(Duration requestTimeoutOffset) The request timeout client offset is used in commands where theCamundaClientBuilder.defaultRequestTimeout(Duration)is also passed to the server.defaultTenantId(String tenantId) grpcAddress(URI grpcAddress) 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 Camunda.maxMetadataSize(int maxMetadataSize) A custom maxMetadataSize allows the client to receive larger or smaller response headers from Camunda.numJobWorkerExecutionThreads(int numThreads) overrideAuthority(String authority) Overrides the authority used with TLS virtual hosting.preferRestOverGrpc(boolean preferRestOverGrpc) If true, will prefer to use REST over gRPC for calls which can be done over both REST and gRPC.restAddress(URI restAddress) toString()useDefaultRetryPolicy(boolean useDefaultRetryPolicy) If enabled, the client will make use of the default retry policy defined.withChainHandlers(org.apache.hc.client5.http.async.AsyncExecChainHandler... chainHandler) Custom implementations of the Apache HttpClientAsyncExecChainHandlermiddleware API.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.withDomain(String domain) Sets the domain of the Camunda Cloud stage.withInterceptors(io.grpc.ClientInterceptor... interceptor) Custom implementations of the gRPCClientInterceptormiddleware API.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.client.CamundaClientBuilder
jobWorkerExecutor
-
Constructor Details
-
CamundaClientCloudBuilderImpl
public CamundaClientCloudBuilderImpl()
-
-
Method Details
-
withClusterId
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2 withClusterId(String clusterId) Description copied from interface:CamundaClientCloudBuilderStep1Sets the cluster id of the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClusterIdin interfaceCamundaClientCloudBuilderStep1- Parameters:
clusterId- cluster id of the Camunda Cloud cluster.
-
withClientId
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3 withClientId(String clientId) Description copied from interface:CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2Sets the client id that will be used to authenticate against the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClientIdin interfaceCamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2- Parameters:
clientId- client id that will be used in the authentication.
-
withClientSecret
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4 withClientSecret(String clientSecret) Description copied from interface:CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3Sets the client secret that will be used to authenticate against the Camunda Cloud cluster. This parameter is mandatory.- Specified by:
withClientSecretin interfaceCamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3- Parameters:
clientSecret- client secret that will be used in the authentication.
-
withRegion
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5 withRegion(String region) Description copied from interface:CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4Sets the region of the Camunda Cloud cluster. Default is 'bru-2'.- Specified by:
withRegionin interfaceCamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4- Parameters:
region- region of the Camunda Cloud cluster
-
withDomain
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5 withDomain(String domain) Description copied from interface:CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5Sets the domain of the Camunda Cloud stage. Default is 'camunda.io', the production stage.- Specified by:
withDomainin interfaceCamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4.CamundaClientCloudBuilderStep5- Parameters:
domain- domain of the Camunda Cloud stage
-
withProperties
Description copied from interface:CamundaClientBuilderSets all the properties from aPropertiesobject. Can be used to configure the client from a properties file.See
ClientPropertiesfor valid property names.- Specified by:
withPropertiesin interfaceCamundaClientBuilder
-
applyEnvironmentVariableOverrides
public CamundaClientBuilder applyEnvironmentVariableOverrides(boolean applyEnvironmentVariableOverrides) Description copied from interface:CamundaClientBuilderAllows 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 interfaceCamundaClientBuilder
-
restAddress
- Specified by:
restAddressin interfaceCamundaClientBuilder- Parameters:
restAddress- the REST API address of a gateway that the client can connect to. The address must be an absolute URL, including the scheme.The default value is
https://0.0.0.0:8080.
-
grpcAddress
- Specified by:
grpcAddressin interfaceCamundaClientBuilder- Parameters:
grpcAddress- the gRPC address of a gateway that the client can connect to. The address must be an absolute URL, including the scheme.The default value is
https://0.0.0.0:26500.
-
defaultTenantId
@ExperimentalApi("https://github.com/camunda/camunda/issues/14106") public CamundaClientBuilder defaultTenantId(String tenantId) - Specified by:
defaultTenantIdin interfaceCamundaClientBuilder- 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/camunda/issues/14106") public CamundaClientBuilder defaultJobWorkerTenantIds(List<String> tenantIds) - Specified by:
defaultJobWorkerTenantIdsin interfaceCamundaClientBuilder- 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
- Specified by:
defaultJobWorkerMaxJobsActivein interfaceCamundaClientBuilder- Parameters:
maxJobsActive- Default value forJobWorkerBuilderStep1.JobWorkerBuilderStep3.maxJobsActive(int). Default value is 32.
-
numJobWorkerExecutionThreads
- Specified by:
numJobWorkerExecutionThreadsin interfaceCamundaClientBuilder- 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 CamundaClientBuilder jobWorkerExecutor(ScheduledExecutorService executor, boolean takeOwnership) Description copied from interface:CamundaClientBuilderAllows 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
CamundaClientBuilder.numJobWorkerExecutionThreads(int).- Specified by:
jobWorkerExecutorin interfaceCamundaClientBuilder- 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
Description copied from interface:CamundaClientBuilderThe name of the worker which is used when none is set for a job worker. Default is 'default'.- Specified by:
defaultJobWorkerNamein interfaceCamundaClientBuilder
-
defaultJobTimeout
Description copied from interface:CamundaClientBuilderThe timeout which is used when none is provided for a job worker. Default is 5 minutes.- Specified by:
defaultJobTimeoutin interfaceCamundaClientBuilder
-
defaultJobPollInterval
Description copied from interface:CamundaClientBuilderThe interval which a job worker is periodically polling for new jobs. Default is 100 milliseconds.- Specified by:
defaultJobPollIntervalin interfaceCamundaClientBuilder
-
defaultMessageTimeToLive
Description copied from interface:CamundaClientBuilderThe time-to-live which is used when none is provided for a message. Default is 1 hour.- Specified by:
defaultMessageTimeToLivein interfaceCamundaClientBuilder
-
defaultRequestTimeout
Description copied from interface:CamundaClientBuilderThe request timeout used if not overridden by the command. Default is 10 seconds.- Specified by:
defaultRequestTimeoutin interfaceCamundaClientBuilder
-
defaultRequestTimeoutOffset
Description copied from interface:CamundaClientBuilderThe request timeout client offset is used in commands where theCamundaClientBuilder.defaultRequestTimeout(Duration)is also passed to the server. This ensures that the client timeout does not occur before the server timeout.The client-side timeout for these commands is calculated as the sum of
defaultRequestTimeoutanddefaultRequestTimeoutOffset.Default is 1 second.
- Specified by:
defaultRequestTimeoutOffsetin interfaceCamundaClientBuilder
-
caCertificatePath
Description copied from interface:CamundaClientBuilderPath to a root CA certificate to be used instead of the certificate in the default default store.- Specified by:
caCertificatePathin interfaceCamundaClientBuilder
-
credentialsProvider
Description copied from interface:CamundaClientBuilderA customCredentialsProviderwhich will be used to apply authentication credentials to requests.- Specified by:
credentialsProviderin interfaceCamundaClientBuilder
-
keepAlive
Description copied from interface:CamundaClientBuilderTime interval between keep alive messages sent to the gateway. The default is 45 seconds.- Specified by:
keepAlivein interfaceCamundaClientBuilder
-
withInterceptors
Description copied from interface:CamundaClientBuilderCustom implementations of the gRPCClientInterceptormiddleware API. The interceptors will be applied to every gRPC call that the client makes. More details can be found at invalid input: '{@link <a href="https://grpc.io/docs/guides/interceptors/">grpc.io</a>'}.- Specified by:
withInterceptorsin interfaceCamundaClientBuilder
-
withChainHandlers
public CamundaClientCloudBuilderStep1.CamundaClientCloudBuilderStep2.CamundaClientCloudBuilderStep3.CamundaClientCloudBuilderStep4 withChainHandlers(org.apache.hc.client5.http.async.AsyncExecChainHandler... chainHandler) Description copied from interface:CamundaClientBuilderCustom implementations of the Apache HttpClientAsyncExecChainHandlermiddleware API. The middleware implementations will be called on every REST API call that the client makes.- Specified by:
withChainHandlersin interfaceCamundaClientBuilder
-
withJsonMapper
- Specified by:
withJsonMapperin interfaceCamundaClientBuilder
-
overrideAuthority
Description copied from interface:CamundaClientBuilderOverrides 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 plaintext connection is used.
- Specified by:
overrideAuthorityin interfaceCamundaClientBuilder- Parameters:
authority- The alternative authority to use, commonly in the formhostorhost:port
-
maxMessageSize
Description copied from interface:CamundaClientBuilderA custom maxMessageSize allows the client to receive larger or smaller responses from Camunda. Technically, it specifies the maxInboundMessageSize of the gRPC channel. The default is 5242880 = 5MB.- Specified by:
maxMessageSizein interfaceCamundaClientBuilder
-
maxMetadataSize
Description copied from interface:CamundaClientBuilderA custom maxMetadataSize allows the client to receive larger or smaller response headers from Camunda. Technically, it specifies the maxInboundMetadataSize of the gRPC channel. The default is 16384 = 16KB .- Specified by:
maxMetadataSizein interfaceCamundaClientBuilder
-
defaultJobWorkerStreamEnabled
Description copied from interface:CamundaClientBuilderA custom streamEnabled allows the client to use job stream instead of job poll. The default value is set as enabled.- Specified by:
defaultJobWorkerStreamEnabledin interfaceCamundaClientBuilder
-
useDefaultRetryPolicy
Description copied from interface:CamundaClientBuilderIf enabled, the client will make use of the default retry policy defined. False by default.NOTE: the default retry policy is taken from the
gateway-service-config.jsonin theio.camunda:zeebe-gateway-protocol-implJAR.- Specified by:
useDefaultRetryPolicyin interfaceCamundaClientBuilder
-
preferRestOverGrpc
Description copied from interface:CamundaClientBuilderIf true, will prefer to use REST over gRPC for calls which can be done over both REST and gRPC. The default value istrue(REST is preferred).NOTE: job streaming is only supported via gRPC
- Specified by:
preferRestOverGrpcin interfaceCamundaClientBuilder- Parameters:
preferRestOverGrpc- if true, the client will use REST instead of gRPC whenever possible- Returns:
- this builder for chaining
-
build
- Specified by:
buildin interfaceCamundaClientBuilder- Returns:
- a new
CamundaClientwith the provided configuration options.
-
toString
-