@ExperimentalApi public abstract class ServerCallStreamObserver<V> extends CallStreamObserver<V>
CallStreamObserver to allows for interaction with call
cancellation events on the server side.| Constructor and Description |
|---|
ServerCallStreamObserver() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isCancelled()
If
true indicates that the call has been cancelled by the remote peer. |
abstract void |
setOnCancelHandler(Runnable onCancelHandler)
|
disableAutoInboundFlowControl, isReady, request, setOnReadyHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCompleted, onError, onNextpublic abstract boolean isCancelled()
true indicates that the call has been cancelled by the remote peer.public abstract void setOnCancelHandler(Runnable onCancelHandler)
Runnable that will be called if the calls isCancelled() state
changes from false to true. It is guaranteed that execution of the
Runnable are serialized with calls to the 'inbound' StreamObserver.
Note that the handler may be called some time after isCancelled() has transitioned to
true as other callbacks may still be executing in the 'inbound' observer.
onCancelHandler - to call when client has cancelled the call.