Class DeployResourceCommandImpl
- All Implemented Interfaces:
CommandWithCommunicationApiStep<DeployResourceCommandStep1>,CommandWithTenantStep<DeployResourceCommandStep1.DeployResourceCommandStep2>,DeployResourceCommandStep1,DeployResourceCommandStep1.DeployResourceCommandStep2,FinalCommandStep<DeploymentEvent>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.api.command.DeployResourceCommandStep1
DeployResourceCommandStep1.DeployResourceCommandStep2 -
Field Summary
Fields inherited from interface io.camunda.client.api.command.CommandWithTenantStep
DEFAULT_TENANT_IDENTIFIER -
Constructor Summary
ConstructorsConstructorDescriptionDeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, CamundaClientConfiguration config, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper) DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper) 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 Camunda gateway.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.useGrpc()Experimental: This method is under development, and as such using it may have no effect on the command builder when called.useRest()Experimental: This method is under development, and as such using it may have no effect on the command builder when called.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
DeployResourceCommandImpl
public DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, CamundaClientConfiguration config, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper) -
DeployResourceCommandImpl
@Deprecated public DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper) Deprecated.since 8.3.0, useinvalid reference
DeployResourceCommandImpl#DeployResourceCommandImpl(GatewayStub asyncStub, CamundaClientConfiguration config, Predicate retryPredicate)A constructor that provides an instance with thetenantId set.From version 8.3.0, the java client supports multi-tenancy for this command, which requires the
tenantIdproperty 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:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceBytesin 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addResourceString
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceString(String resource, Charset charset, String resourceName) Description copied from interface:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceStringin 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addResourceStringUtf8
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceStringUtf8(String resourceString, String resourceName) Description copied from interface:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceStringUtf8in 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addResourceStream
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceStream(InputStream resourceStream, String resourceName) Description copied from interface:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceStreamin 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addResourceFromClasspath
public DeployResourceCommandStep1.DeployResourceCommandStep2 addResourceFromClasspath(String classpathResource) Description copied from interface:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceFromClasspathin 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addResourceFile
Description copied from interface:DeployResourceCommandStep1Add the given resource to the deployment.- Specified by:
addResourceFilein 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
to complete the command and send it to the broker.
invalid reference
#send()
-
addProcessModel
public DeployResourceCommandStep1.DeployResourceCommandStep2 addProcessModel(BpmnModelInstance processDefinition, String resourceName) Description copied from interface:DeployResourceCommandStep1Add the given process as resource to the deployment.- Specified by:
addProcessModelin interfaceDeployResourceCommandStep1- Parameters:
processDefinition- the process as modelresourceName- the name of the resource (e.g. "process.bpmn")- Returns:
- the builder for this command. Call
to complete the command and send it to the broker.
invalid reference
#send()
-
requestTimeout
Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingCamundaClientBuilder.defaultRequestTimeout(Duration).- Specified by:
requestTimeoutin interfaceFinalCommandStep<DeploymentEvent>- Parameters:
requestTimeout- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStepSends the command to the Camunda gateway. This operation is asynchronous. In case of success, the future returns the event that was generated by the Camunda gateway in response to the command.Call
CamundaFuture.join()to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();- Specified by:
sendin interfaceFinalCommandStep<DeploymentEvent>- Returns:
- a future tracking state of success/failure of the command.
-
tenantId
Description copied from interface:CommandWithTenantStepSpecifies 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 Camunda 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 Camunda cluster, are assigned to the
CommandWithTenantStep.DEFAULT_TENANT_IDENTIFIER.If no tenant is explicitly specified, then the command is rejected.
- Specified by:
tenantIdin 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
-
useRest
Description copied from interface:CommandWithCommunicationApiStepExperimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Camunda, and already wants to use this API during its development. As support for REST is added to Camunda, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets REST as the communication API for this command. If this command doesn't support communication over REST, it simply returns the command builder instance unchanged. The default communication API can be configured using
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useRestin interfaceCommandWithCommunicationApiStep<DeployResourceCommandStep1>- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStepExperimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Camunda, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets gRPC as the communication API for this command. If this command doesn't support communication over gRPC, it simply returns the command builder instance unchanged. The default communication API can be configured using
CamundaClientBuilder.preferRestOverGrpc(boolean).- Specified by:
useGrpcin interfaceCommandWithCommunicationApiStep<DeployResourceCommandStep1>- Returns:
- the configured command
-
invalid reference