public class ObservableReactiveUtil extends Object
Mono).| Constructor and Description |
|---|
ObservableReactiveUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <RequestT,ResponseT> |
streamingCall(Consumer<io.grpc.stub.StreamObserver<ResponseT>> remoteCall)
Invokes a lambda that issues a streaming call and directs the response to a
Flux
stream. |
static <ResponseT> |
unaryCall(Consumer<io.grpc.stub.StreamObserver<ResponseT>> remoteCall)
Invokes a lambda that in turn issues a remote call, directing the response to a
Mono
stream. |
public static <ResponseT> reactor.core.publisher.Mono<ResponseT> unaryCall(Consumer<io.grpc.stub.StreamObserver<ResponseT>> remoteCall)
Mono
stream.ResponseT - type of remote call responseremoteCall - lambda capable of invoking the correct remote call, making use of the
Mono-converting StreamObserver implementation.Mono containing the response of the unary call.public static <RequestT,ResponseT> reactor.core.publisher.Flux<ResponseT> streamingCall(Consumer<io.grpc.stub.StreamObserver<ResponseT>> remoteCall)
Flux
stream.RequestT - request typeResponseT - response typeremoteCall - call to makeFlux of response objects resulting from the streaming call.Copyright © 2021 Google LLC. All rights reserved.