Package io.grpc.netty

Class NettyClientStream.Sink

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Sink()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel​(Status status)
      Tears down the stream, typically in the event of a timeout.
      void writeFrame​(WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages)
      Sends an outbound frame to the remote end point.
      private void writeFrameInternal​(WritableBuffer frame, boolean endOfStream, boolean flush, int numMessages)  
      void writeHeaders​(Metadata headers, byte[] requestPayload)
      Sends the request headers to the remote end point.
      private void writeHeadersInternal​(Metadata headers, byte[] requestPayload)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sink

        private Sink()
    • Method Detail

      • writeHeaders

        public void writeHeaders​(Metadata headers,
                                 byte[] requestPayload)
        Description copied from interface: AbstractClientStream.Sink
        Sends the request headers to the remote end point.
        Specified by:
        writeHeaders in interface AbstractClientStream.Sink
        Parameters:
        headers - the metadata to be sent
        requestPayload - the payload needs to be sent in the headers if not null. Should only be used when sending an unary GET request
      • writeHeadersInternal

        private void writeHeadersInternal​(Metadata headers,
                                          byte[] requestPayload)
      • writeFrameInternal

        private void writeFrameInternal​(WritableBuffer frame,
                                        boolean endOfStream,
                                        boolean flush,
                                        int numMessages)
      • writeFrame

        public void writeFrame​(WritableBuffer frame,
                               boolean endOfStream,
                               boolean flush,
                               int numMessages)
        Description copied from interface: AbstractClientStream.Sink
        Sends an outbound frame to the remote end point.
        Specified by:
        writeFrame in interface AbstractClientStream.Sink
        Parameters:
        frame - a buffer containing the chunk of data to be sent, or null if endOfStream with no data to send
        endOfStream - true if this is the last frame; flush is guaranteed to be true if this is true
        flush - true if more data may not be arriving soon
        numMessages - the number of messages this series of frames represents, must be >= 0.