Class NettyClientStream.Sink
java.lang.Object
io.grpc.netty.NettyClientStream.Sink
- All Implemented Interfaces:
AbstractClientStream.Sink
- Enclosing class:
NettyClientStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTears down the stream, typically in the event of a timeout.voidwriteFrame(WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages) Sends an outbound frame to the remote end point.private voidwriteFrameInternal(WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages) voidwriteHeaders(Metadata headers, byte[] requestPayload) Sends the request headers to the remote end point.private voidwriteHeadersInternal(Metadata headers, byte[] requestPayload)
-
Constructor Details
-
Sink
private Sink()
-
-
Method Details
-
writeHeaders
Description copied from interface:AbstractClientStream.SinkSends the request headers to the remote end point.- Specified by:
writeHeadersin interfaceAbstractClientStream.Sink- Parameters:
headers- the metadata to be sentrequestPayload- the payload needs to be sent in the headers if not null. Should only be used when sending an unary GET request
-
writeHeadersInternal
-
writeFrameInternal
private void writeFrameInternal(WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages) -
writeFrame
Description copied from interface:AbstractClientStream.SinkSends an outbound frame to the remote end point.- Specified by:
writeFramein interfaceAbstractClientStream.Sink- Parameters:
frame- a buffer containing the chunk of data to be sent, ornullifendOfStreamwith no data to sendendOfStream-trueif this is the last frame;flushis guaranteed to betrueif this istrueflush-trueif more data may not be arriving soonnumMessages- the number of messages this series of frames represents, must be >= 0.
-
cancel
Description copied from interface:AbstractClientStream.SinkTears down the stream, typically in the event of a timeout. This method may be called multiple times and from any thread.This is a clone of
ClientStream.cancel(Status);AbstractClientStream.cancel(Status)delegates to this method.- Specified by:
cancelin interfaceAbstractClientStream.Sink
-