Package io.grpc.internal
Interface Framer
- All Known Implementing Classes:
AbstractClientStream.GetFramer,MessageFramer
public interface Framer
Interface for framing gRPC messages.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes, with flush.voiddispose()Closes, without flush.voidflush()Flush the buffered payload.booleanisClosed()Returns whether the framer is closed.setCompressor(Compressor compressor) Set the compressor used for compression.voidsetMaxOutboundMessageSize(int maxSize) Set a size limit for each outbound message.setMessageCompression(boolean enable) Enable or disable compression.voidwritePayload(InputStream message) Writes out a payload message.
-
Method Details
-
writePayload
Writes out a payload message.- Parameters:
message- contains the message to be written out. It will be completely consumed.
-
flush
void flush()Flush the buffered payload. -
isClosed
boolean isClosed()Returns whether the framer is closed. -
close
void close()Closes, with flush. -
dispose
void dispose()Closes, without flush. -
setMessageCompression
Enable or disable compression. -
setCompressor
Set the compressor used for compression. -
setMaxOutboundMessageSize
void setMaxOutboundMessageSize(int maxSize) Set a size limit for each outbound message.
-