public interface ClientStream extends Stream
Stream
to support client-side termination semantics.
An implementation doesn't need to be thread-safe. All methods are expected to execute quickly.
Modifier and Type | Method and Description |
---|---|
void |
cancel(Status reason)
Abnormally terminates the stream.
|
void |
halfClose()
Closes the local side of this stream and flushes any remaining messages.
|
flush, isReady, request, writeMessage
void cancel(Status reason)
ClientStreamListener.closed(io.grpc.Status, io.grpc.Metadata.Trailers)
is called. This method is safe to be called
at any time and multiple times.reason
- must be one of Status.CANCELLED or Status.DEADLINE_EXCEEDEDvoid halfClose()