Package io.grpc.internal
Class AbstractClientStream.GetFramer
- java.lang.Object
-
- io.grpc.internal.AbstractClientStream.GetFramer
-
- All Implemented Interfaces:
Framer
- Enclosing class:
- AbstractClientStream
private class AbstractClientStream.GetFramer extends java.lang.Object implements Framer
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
closed
private Metadata
headers
private byte[]
payload
private StatsTraceContext
statsTraceCtx
-
Constructor Summary
Constructors Constructor Description GetFramer(Metadata headers, StatsTraceContext statsTraceCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes, with flush.void
dispose()
Closes, without flush.void
flush()
Flush the buffered payload.boolean
isClosed()
Returns whether the framer is closed.Framer
setCompressor(Compressor compressor)
Set the compressor used for compression.void
setMaxOutboundMessageSize(int maxSize)
Set a size limit for each outbound message.Framer
setMessageCompression(boolean enable)
Enable or disable compression.void
writePayload(java.io.InputStream message)
Writes out a payload message.
-
-
-
Field Detail
-
headers
private Metadata headers
-
closed
private boolean closed
-
statsTraceCtx
private final StatsTraceContext statsTraceCtx
-
payload
private byte[] payload
-
-
Constructor Detail
-
GetFramer
public GetFramer(Metadata headers, StatsTraceContext statsTraceCtx)
-
-
Method Detail
-
writePayload
public void writePayload(java.io.InputStream message)
Description copied from interface:Framer
Writes out a payload message.- Specified by:
writePayload
in interfaceFramer
- Parameters:
message
- contains the message to be written out. It will be completely consumed.
-
flush
public void flush()
Description copied from interface:Framer
Flush the buffered payload.
-
isClosed
public boolean isClosed()
Description copied from interface:Framer
Returns whether the framer is closed.
-
setMessageCompression
public Framer setMessageCompression(boolean enable)
Description copied from interface:Framer
Enable or disable compression.- Specified by:
setMessageCompression
in interfaceFramer
-
setCompressor
public Framer setCompressor(Compressor compressor)
Description copied from interface:Framer
Set the compressor used for compression.- Specified by:
setCompressor
in interfaceFramer
-
setMaxOutboundMessageSize
public void setMaxOutboundMessageSize(int maxSize)
Description copied from interface:Framer
Set a size limit for each outbound message.- Specified by:
setMaxOutboundMessageSize
in interfaceFramer
-
-