Class FutureListStreamObserver<T>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<List<T>>
-
- io.axoniq.axonserver.connector.impl.FutureListStreamObserver<T>
-
- Type Parameters:
T- the type of result thisCompletableFutureandStreamObserverresolves
- All Implemented Interfaces:
io.grpc.stub.StreamObserver<T>,CompletionStage<List<T>>,Future<List<T>>
public class FutureListStreamObserver<T> extends CompletableFuture<List<T>> implements io.grpc.stub.StreamObserver<T>
An implementation of both aCompletableFutureandStreamObserver. This future will complete successfully ononNext(Object)or ononCompleted()(granted that the givenvalueWhenNoResultis not of typeThrowable). OnonError(Throwable), this future willCompletableFuture.completeExceptionally(Throwable).- Since:
- 4.6.0
- Author:
- Stefan Dragisic
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
Constructor Summary
Constructors Constructor Description FutureListStreamObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCompleted()voidonError(Throwable t)voidonNext(T value)-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, 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
-
-
-
-
Method Detail
-
onNext
public void onNext(T value)
- Specified by:
onNextin interfaceio.grpc.stub.StreamObserver<T>
-
onError
public void onError(Throwable t)
- Specified by:
onErrorin interfaceio.grpc.stub.StreamObserver<T>
-
onCompleted
public void onCompleted()
- Specified by:
onCompletedin interfaceio.grpc.stub.StreamObserver<T>
-
-