public final class ObservableReactiveUtil extends Object
Mono
, Flux
).Modifier and Type | Method and Description |
---|---|
static <R> reactor.core.publisher.Flux<R> |
streamingCall(Consumer<io.grpc.stub.StreamObserver<R>> remoteCall)
Invokes a lambda that issues a streaming call and directs the response to a
Flux stream. |
static <R> reactor.core.publisher.Mono<R> |
unaryCall(Consumer<io.grpc.stub.StreamObserver<R>> remoteCall)
Invokes a lambda that in turn issues a remote call, directing the response to a
Mono stream. |
public static <R> reactor.core.publisher.Mono<R> unaryCall(Consumer<io.grpc.stub.StreamObserver<R>> remoteCall)
Mono
stream.R
- 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 <R> reactor.core.publisher.Flux<R> streamingCall(Consumer<io.grpc.stub.StreamObserver<R>> remoteCall)
Flux
stream.R
- response typeremoteCall
- call to makeFlux
of response objects resulting from the streaming call.Copyright © 2021. All rights reserved.