Class DeployResourceCommandImpl
java.lang.Object
io.camunda.zeebe.client.impl.command.DeployResourceCommandImpl
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsConstructorDescriptionDeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<Throwable> retryPredicate) -
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.
-
Constructor Details
-
DeployResourceCommandImpl
public DeployResourceCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<Throwable> retryPredicate)
-
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
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
#send()to complete the command and send it to the broker.
-
requestTimeout
Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.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 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<JobEvent> future = command.send(); JobEvent event = future.join();
- Specified by:
sendin interfaceFinalCommandStep<DeploymentEvent>- Returns:
- a future tracking state of success/failure of the command.
-