Interface MessageDeframer.Listener

All Known Implementing Classes:
AbstractClientStream.TransportState, AbstractServerStream.TransportState, AbstractStream.TransportState, Http2ClientStreamTransportState
Enclosing class:
MessageDeframer

public static interface MessageDeframer.Listener
A listener of deframing events. These methods will be invoked from the deframing thread.
  • Method Details

    • bytesRead

      void bytesRead(int numBytes)
      Called when the given number of bytes has been read from the input source of the deframer. This is typically used to indicate to the underlying transport that more data can be accepted.
      Parameters:
      numBytes - the number of bytes read from the deframer's input source.
    • messagesAvailable

      void messagesAvailable(StreamListener.MessageProducer producer)
      Called to deliver the next complete message.
      Parameters:
      producer - single message producer wrapping the message.
    • deframerClosed

      void deframerClosed(boolean hasPartialMessage)
      Called when the deframer closes.
      Parameters:
      hasPartialMessage - whether the deframer contained an incomplete message at closing.
    • deframeFailed

      void deframeFailed(Throwable cause)
      Called when a MessageDeframer.deframe(ReadableBuffer) operation failed.
      Parameters:
      cause - the actual failure