Class ForwardingClientStreamListener

java.lang.Object
io.grpc.internal.ForwardingClientStreamListener
All Implemented Interfaces:
ClientStreamListener, StreamListener

abstract class ForwardingClientStreamListener extends Object implements ClientStreamListener
  • Constructor Details

    • ForwardingClientStreamListener

      ForwardingClientStreamListener()
  • Method Details

    • delegate

      protected abstract ClientStreamListener delegate()
    • headersRead

      public void headersRead(Metadata headers)
      Description copied from interface: ClientStreamListener
      Called upon receiving all header information from the remote end-point. Note that transports are not required to call this method if no header information is received, this would occur when a stream immediately terminates with an error and only ClientStreamListener.closed(io.grpc.Status, RpcProgress, Metadata) is called.

      This method should return quickly, as the same thread may be used to process other streams.

      Specified by:
      headersRead in interface ClientStreamListener
      Parameters:
      headers - the fully buffered received headers.
    • closed

      public void closed(Status status, ClientStreamListener.RpcProgress rpcProgress, Metadata trailers)
      Description copied from interface: ClientStreamListener
      Called when the stream is fully closed. Status.Code.OK is the only status code that is guaranteed to have been sent from the remote server. Any other status code may have been caused by abnormal stream termination. This is guaranteed to always be the final call on a listener. No further callbacks will be issued.

      This method should return quickly, as the same thread may be used to process other streams.

      Specified by:
      closed in interface ClientStreamListener
      Parameters:
      status - details about the remote closure
      rpcProgress - RPC progress when client stream listener is closed
      trailers - trailing metadata
    • messagesAvailable

      public void messagesAvailable(StreamListener.MessageProducer producer)
      Description copied from interface: StreamListener
      Called upon receiving a message from the remote end-point.

      Implementations must eventually drain the provided producer StreamListener.MessageProducer completely by invoking StreamListener.MessageProducer.next() to obtain deframed messages until the producer returns null.

      This method should return quickly, as the same thread may be used to process other streams.

      Specified by:
      messagesAvailable in interface StreamListener
      Parameters:
      producer - supplier of deframed messages.
    • onReady

      public void onReady()
      Description copied from interface: StreamListener
      This indicates that the transport is now capable of sending additional messages without requiring excessive buffering internally. This event is just a suggestion and the application is free to ignore it, however doing so may result in excessive buffering within the transport.
      Specified by:
      onReady in interface StreamListener
    • toString

      public String toString()
      Overrides:
      toString in class Object