Class TopologyRequestImpl
java.lang.Object
io.camunda.zeebe.client.impl.command.TopologyRequestImpl
- All Implemented Interfaces:
CommandWithCommunicationApiStep<TopologyRequestStep1>
,FinalCommandStep<Topology>
,TopologyRequestStep1
-
Constructor Summary
ConstructorsConstructorDescriptionTopologyRequestImpl
(GatewayGrpc.GatewayStub asyncStub, HttpClient httpClient, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, boolean useRest) -
Method Summary
Modifier and TypeMethodDescriptionrequestTimeout
(Duration requestTimeout) Sets the request timeout for the command.send()
Sends the command to the Zeebe broker.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.
-
Constructor Details
-
TopologyRequestImpl
public TopologyRequestImpl(GatewayGrpc.GatewayStub asyncStub, HttpClient httpClient, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, boolean useRest)
-
-
Method Details
-
useRest
Description copied from interface:CommandWithCommunicationApiStep
Experimental: 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 Zeebe, 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 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
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useRest
in interfaceCommandWithCommunicationApiStep<TopologyRequestStep1>
- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStep
Experimental: 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 Zeebe, 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
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useGrpc
in interfaceCommandWithCommunicationApiStep<TopologyRequestStep1>
- Returns:
- the configured command
-
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<Topology>
- 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<Topology>
- Returns:
- a future tracking state of success/failure of the command.
-