FutureObserver

public final class FutureObserver<T>

A stream observer which can provide a CompletableFuture view on the stream.

This implementation works only with the unary gRPC calls, i.e. onNext cannot be called more then once.

Functions

Link copied to clipboard
public static FutureObserver<T> create<T>()
Creates a new instance of FutureObserver.
Link copied to clipboard
public void onCompleted()
Link copied to clipboard
public void onError(Throwable t)
Link copied to clipboard
public void onNext(T value)
Link copied to clipboard
Retrieves the future view on this observer result.
Link copied to clipboard
public static FutureObserver<T> withDefault<T>(T defaultValue)
Creates a new instance of FutureObserver with the given defaultValue.