Class DeployResourceCommandImpl
java.lang.Object
io.camunda.zeebe.client.impl.command.DeployResourceCommandImpl
- All Implemented Interfaces:
CommandWithTenantStep<DeployResourceCommandStep1.DeployResourceCommandStep2>
,DeployResourceCommandStep1
,DeployResourceCommandStep1.DeployResourceCommandStep2
,FinalCommandStep<DeploymentEvent>
public final class DeployResourceCommandImpl
extends Object
implements DeployResourceCommandStep1, DeployResourceCommandStep1.DeployResourceCommandStep2
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.client.api.command.DeployResourceCommandStep1
DeployResourceCommandStep1.DeployResourceCommandStep2
-
Field Summary
Fields inherited from interface io.camunda.zeebe.client.api.command.CommandWithTenantStep
DEFAULT_TENANT_IDENTIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionDeployResourceCommandImpl
(GatewayGrpc.GatewayStub asyncStub, ZeebeClientConfiguration config, Predicate<CredentialsProvider.StatusCode> retryPredicate) DeployResourceCommandImpl
(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionaddProcessModel
(BpmnModelInstance processDefinition, String resourceName) Add the given process as resource to the deployment.addResourceBytes
(byte[] resource, String resourceName) Add the given resource to the deployment.addResourceFile
(String filename) Add the given resource to the deployment.addResourceFromClasspath
(String classpathResource) Add the given resource to the deployment.addResourceStream
(InputStream resourceStream, String resourceName) Add the given resource to the deployment.addResourceString
(String resource, Charset charset, String resourceName) Add the given resource to the deployment.addResourceStringUtf8
(String resourceString, String resourceName) Add the given resource to the deployment.requestTimeout
(Duration requestTimeout) Sets the request timeout for the command.send()
Sends the command to the Zeebe broker.Specifies the tenant that will own any entities (e.g.
-
Constructor Details
-
DeployResourceCommandImpl
public DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, ZeebeClientConfiguration config, Predicate<CredentialsProvider.StatusCode> retryPredicate) -
DeployResourceCommandImpl
@Deprecated public DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate) Deprecated.A constructor that provides an instance with the
tenantId set.From version 8.3.0, the java client supports multi-tenancy for this command, which requires the
tenantId
property to be defined. This constructor is only intended for backwards compatibility in tests.
-
-
Method Details
-
addResourceBytes
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceBytes(byte[] resource, String resourceName) Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceBytes
in interfaceDeployResourceCommandStep1
- Parameters:
resource
- the resource content as byte arrayresourceName
- the name of the resource (e.g. "process.bpmn" or "decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addResourceString
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceString(String resource, Charset charset, String resourceName) Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceString
in interfaceDeployResourceCommandStep1
- Parameters:
resource
- the resource content as Stringcharset
- the charset of the StringresourceName
- the name of the resource (e.g. "process.bpmn" or "decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addResourceStringUtf8
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceStringUtf8(String resourceString, String resourceName) Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceStringUtf8
in interfaceDeployResourceCommandStep1
- Parameters:
resourceString
- the resource content as UTF-8-encoded StringresourceName
- the name of the resource (e.g. "process.bpmn" or "decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addResourceStream
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceStream(InputStream resourceStream, String resourceName) Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceStream
in interfaceDeployResourceCommandStep1
- Parameters:
resourceStream
- the resource content as streamresourceName
- the name of the resource (e.g. "process.bpmn" or "decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addResourceFromClasspath
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceFromClasspath(String classpathResource) Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceFromClasspath
in interfaceDeployResourceCommandStep1
- Parameters:
classpathResource
- the path of the resource file in the classpath (e.g. "wf/process.bpmn" or "dmn/decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addResourceFile
Description copied from interface:DeployResourceCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceFile
in interfaceDeployResourceCommandStep1
- Parameters:
filename
- the absolute path of the resource file (e.g. "~/wf/process.bpmn" or "~/dmn/decision.dmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
addProcessModel
public DeployResourceCommandStep1.DeployResourceCommandStep2 addProcessModel(BpmnModelInstance processDefinition, String resourceName) Description copied from interface:DeployResourceCommandStep1
Add the given process as resource to the deployment.- Specified by:
addProcessModel
in interfaceDeployResourceCommandStep1
- Parameters:
processDefinition
- the process as modelresourceName
- the name of the resource (e.g. "process.bpmn")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
requestTimeout
Description copied from interface:FinalCommandStep
Sets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.defaultRequestTimeout(Duration)
.- Specified by:
requestTimeout
in interfaceFinalCommandStep<DeploymentEvent>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStep
Sends the command to the Zeebe broker. This operation is asynchronous. In case of success, the future returns the event that was generated by the Zeebe broker in response to the command.Call
ZeebeFuture.join()
to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<DeploymentEvent>
- Returns:
- a future tracking state of success/failure of the command.
-
tenantId
Description copied from interface:CommandWithTenantStep
Specifies the tenant that will own any entities (e.g. process definition, process instances, etc.) resulting from this command, or that owns any entities (e.g. jobs) referred to from this command.Multi-tenancy
Multiple tenants can share a Zeebe cluster. Entities can be assigned to a specific tenant using an identifier. Only that tenant can access these entities.
Any entities created before multi-tenancy has been enabled in the Zeebe cluster, are assigned to the
CommandWithTenantStep.DEFAULT_TENANT_IDENTIFIER
.If no tenant is explicitly specified, then the command is rejected.
- Specified by:
tenantId
in interfaceCommandWithTenantStep<DeployResourceCommandStep1.DeployResourceCommandStep2>
- Parameters:
tenantId
- the identifier of the tenant to specify for this command, e.g."ACME"
- Returns:
- the builder for this command with the tenant specified
-
DeployResourceCommandImpl(GatewayStub asyncStub, ZeebeClientConfiguration config, Predicate retryPredicate)