public class SynchronizedStreamObserver<V>
extends java.lang.Object
implements io.grpc.stub.StreamObserver<V>
StreamObserver
which provides synchronous access access to an underlying StreamObserver
.
The underlying StreamObserver
must not be used by any other clients.
Modifier and Type | Method and Description |
---|---|
void |
onCompleted() |
void |
onError(java.lang.Throwable t) |
void |
onNext(V value) |
static <V> io.grpc.stub.StreamObserver<V> |
wrapping(io.grpc.stub.StreamObserver<V> underlying)
Create a new
SynchronizedStreamObserver which will delegate all calls to the underlying
StreamObserver , synchronizing access to that observer. |
public static <V> io.grpc.stub.StreamObserver<V> wrapping(io.grpc.stub.StreamObserver<V> underlying)
SynchronizedStreamObserver
which will delegate all calls to the underlying
StreamObserver
, synchronizing access to that observer.public void onError(java.lang.Throwable t)
onError
in interface io.grpc.stub.StreamObserver<V>
public void onCompleted()
onCompleted
in interface io.grpc.stub.StreamObserver<V>