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(io.grpc.Status reason)
Abnormally terminates the stream.
|
io.grpc.Attributes |
getAttributes()
Attributes that the stream holds at the current moment.
|
void |
halfClose()
Closes the local side of this stream and flushes any remaining messages.
|
void |
setAuthority(String authority)
Override the default authority with
authority. |
void |
setDeadline(io.grpc.Deadline deadline)
Sets the effective deadline of the RPC.
|
void |
setDecompressorRegistry(io.grpc.DecompressorRegistry decompressorRegistry)
Sets the registry to find a decompressor for the framer.
|
void |
setFullStreamDecompression(boolean fullStreamDecompression)
Enables full-stream decompression, allowing the client stream to use
GzipInflatingBuffer to decode inbound GZIP compressed streams. |
void |
setMaxInboundMessageSize(int maxSize)
Sets the max size accepted from the remote endpoint.
|
void |
setMaxOutboundMessageSize(int maxSize)
Sets the max size sent to the remote endpoint.
|
void |
start(ClientStreamListener listener)
Starts stream.
|
flush, isReady, request, setCompressor, setMessageCompression, writeMessagevoid cancel(io.grpc.Status reason)
ClientStreamListener.closed(io.grpc.Status, io.grpc.Metadata) is called. This method may only be called
after start(io.grpc.internal.ClientStreamListener), but else is safe to be called at any time and multiple times and
from any thread.reason - must be non-OKvoid halfClose()
start(io.grpc.internal.ClientStreamListener).void setAuthority(String authority)
authority. May only be called before start(io.grpc.internal.ClientStreamListener).void setFullStreamDecompression(boolean fullStreamDecompression)
GzipInflatingBuffer to decode inbound GZIP compressed streams.void setDecompressorRegistry(io.grpc.DecompressorRegistry decompressorRegistry)
start(io.grpc.internal.ClientStreamListener). If the transport does not support compression, this may do nothing.decompressorRegistry - the registry of decompressors for decoding responsesvoid start(ClientStreamListener listener)
start(io.grpc.internal.ClientStreamListener) is called.
This method should not throw any exceptions.
listener - non-null listener of stream eventsvoid setMaxInboundMessageSize(int maxSize)
void setMaxOutboundMessageSize(int maxSize)
void setDeadline(@Nonnull io.grpc.Deadline deadline)
io.grpc.Attributes getAttributes()