@ThreadSafe
public final class DirectStreamObserver<T>
extends java.lang.Object
implements io.grpc.stub.StreamObserver<T>
StreamObserver which uses synchronization on the underlying
CallStreamObserver to provide thread safety.
Flow control with the underlying CallStreamObserver is handled with a Phaser
which waits for advancement of the phase if the CallStreamObserver is not ready.
Creator is expected to advance the Phaser whenever the underlying
CallStreamObserver becomes ready.
| Constructor and Description |
|---|
DirectStreamObserver(java.util.concurrent.Phaser phaser,
io.grpc.stub.CallStreamObserver<T> outboundObserver) |
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T value) |
public DirectStreamObserver(java.util.concurrent.Phaser phaser,
io.grpc.stub.CallStreamObserver<T> outboundObserver)