@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1788") @DoNotMock public abstract class ClientCallStreamObserver<V> extends CallStreamObserver<V>
CallStreamObserver
that allows for lower-level interaction with
client calls.
Like StreamObserver
, implementations are not required to be thread-safe; if multiple
threads will be writing to an instance concurrently, the application must synchronize its calls.
Constructor and Description |
---|
ClientCallStreamObserver() |
Modifier and Type | Method and Description |
---|---|
abstract void |
cancel(String message,
Throwable cause)
Prevent any further processing for this
ClientCallStreamObserver . |
disableAutoInboundFlowControl, isReady, request, setMessageCompression, setOnReadyHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onCompleted, onError, onNext
public abstract void cancel(@Nullable String message, @Nullable Throwable cause)
ClientCallStreamObserver
. No further messages
will be received. The server is informed of cancellations, but may not stop processing the
call. Cancelling an already
cancel()
ed ClientCallStreamObserver
has no effect.
No other methods on this class can be called after this method has been called.
It is recommended that at least one of the arguments to be non-null
, to provide
useful debug information. Both argument being null may log warnings and result in suboptimal
performance. Also note that the provided information will not be sent to the server.
message
- if not null
, will appear as the description of the CANCELLED statuscause
- if not null
, will appear as the cause of the CANCELLED status