Interface AbstractClientStream.Sink
- All Known Implementing Classes:
NettyClientStream.Sink
- Enclosing class:
AbstractClientStream
protected static interface AbstractClientStream.Sink
A sink for outbound operations, separated from the stream simply to avoid name
collisions/confusion. Only called from application thread.
-
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.voidwriteHeaders(Metadata metadata, byte[] payload) Sends the request headers to the remote end point.
-
Method Details
-
writeHeaders
-
writeFrame
void writeFrame(@Nullable WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages) Sends an outbound frame to the remote end point.- 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
Tears 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.
-