Package io.grpc.netty

Class NettyServerStream.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 flush, int numMessages)
      Sends an outbound frame to the remote end point.
      void writeHeaders​(Metadata headers, boolean flush)
      Sends response headers to the remote end point.
      void writeTrailers​(Metadata trailers, boolean headersSent, Status status)
      Sends trailers to the remote end point.
      • 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

      • writeFrame

        public void writeFrame​(WritableBuffer frame,
                               boolean flush,
                               int numMessages)
        Description copied from interface: AbstractServerStream.Sink
        Sends an outbound frame to the remote end point.
        Specified by:
        writeFrame in interface AbstractServerStream.Sink
        Parameters:
        frame - a buffer containing the chunk of data to be sent.
        flush - true if more data may not be arriving soon
        numMessages - the number of messages this frame represents
      • writeTrailers

        public void writeTrailers​(Metadata trailers,
                                  boolean headersSent,
                                  Status status)
        Description copied from interface: AbstractServerStream.Sink
        Sends trailers to the remote end point. This call implies end of stream.
        Specified by:
        writeTrailers in interface AbstractServerStream.Sink
        Parameters:
        trailers - metadata to be sent to the end point
        headersSent - true if response headers have already been sent.
        status - the status that the call ended with