Package io.camunda.zeebe.client.impl
Class ZeebeClientFutureImpl<ClientResponse,BrokerResponse>
java.lang.Object
java.util.concurrent.CompletableFuture<ClientResponse>
io.camunda.zeebe.client.impl.ZeebeClientFutureImpl<ClientResponse,BrokerResponse>
- All Implemented Interfaces:
ZeebeFuture<ClientResponse>
,io.grpc.stub.ClientResponseObserver<com.google.protobuf.GeneratedMessageV3,
,BrokerResponse> io.grpc.stub.StreamObserver<BrokerResponse>
,CompletionStage<ClientResponse>
,Future<ClientResponse>
- Direct Known Subclasses:
RetriableClientFutureImpl
,ZeebeStreamingClientFutureImpl
public class ZeebeClientFutureImpl<ClientResponse,BrokerResponse>
extends CompletableFuture<ClientResponse>
implements ZeebeFuture<ClientResponse>, io.grpc.stub.ClientResponseObserver<com.google.protobuf.GeneratedMessageV3,BrokerResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.grpc.stub.ClientCallStreamObserver<com.google.protobuf.GeneratedMessageV3>
-
Constructor Summary
ConstructorsConstructorDescriptionZeebeClientFutureImpl
(Function<BrokerResponse, ClientResponse> responseMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeStart
(io.grpc.stub.ClientCallStreamObserver<com.google.protobuf.GeneratedMessageV3> requestStream) boolean
cancel
(boolean mayInterruptIfRunning) join()
LikeFuture.get()
but throws runtime exceptions.LikeFuture.get(long, TimeUnit)
but throws runtime exceptions.void
void
void
onNext
(BrokerResponse brokerResponse) Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.CompletionStage
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
Methods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
-
Field Details
-
clientCall
protected io.grpc.stub.ClientCallStreamObserver<com.google.protobuf.GeneratedMessageV3> clientCall
-
-
Constructor Details
-
ZeebeClientFutureImpl
public ZeebeClientFutureImpl() -
ZeebeClientFutureImpl
-
-
Method Details
-
join
Description copied from interface:ZeebeFuture
LikeFuture.get()
but throws runtime exceptions.- Specified by:
join
in interfaceZeebeFuture<ClientResponse>
- Overrides:
join
in classCompletableFuture<ClientResponse>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) - Specified by:
cancel
in interfaceFuture<ClientResponse>
- Overrides:
cancel
in classCompletableFuture<ClientResponse>
-
join
Description copied from interface:ZeebeFuture
LikeFuture.get(long, TimeUnit)
but throws runtime exceptions.- Specified by:
join
in interfaceZeebeFuture<ClientResponse>
-
onNext
- Specified by:
onNext
in interfaceio.grpc.stub.StreamObserver<ClientResponse>
-
onError
- Specified by:
onError
in interfaceio.grpc.stub.StreamObserver<ClientResponse>
-
onCompleted
public void onCompleted()- Specified by:
onCompleted
in interfaceio.grpc.stub.StreamObserver<ClientResponse>
-
beforeStart
public void beforeStart(io.grpc.stub.ClientCallStreamObserver<com.google.protobuf.GeneratedMessageV3> requestStream) - Specified by:
beforeStart
in interfaceio.grpc.stub.ClientResponseObserver<ClientResponse,
BrokerResponse>
-