All Known Implementing Classes:
AbstractDecodedMessageSink, AbstractDecodedMessageSink.Basic, AbstractDecodedMessageSink.Stream, AbstractMessageSink, ByteArrayMessageSink, ByteBufferMessageSink, DecodedBinaryMessageSink, DecodedBinaryStreamMessageSink, DecodedTextMessageSink, DecodedTextStreamMessageSink, DispatchedMessageSink, InputStreamMessageSink, MessageInputStream, MessageReader, PartialByteArrayMessageSink, PartialByteBufferMessageSink, PartialStringMessageSink, ReaderMessageSink, StringMessageSink

public interface MessageSink
Sink consumer for messages (used for multiple frames with continuations, and also to allow for streaming APIs)
  • Method Summary

    Modifier and Type
    accept(Frame frame, Callback callback)
    Consume the frame payload to the message.
    fail(Throwable failure)
    Fail the message sink.
  • Method Details

    • accept

      void accept(Frame frame, Callback callback)
      Consume the frame payload to the message.
      frame - the frame, its payload (and fin state) to append
      callback - the callback for how the frame was consumed
    • fail

      void fail(Throwable failure)

      Fail the message sink.

      Release any resources and fail all stored callbacks as accept(Frame, Callback) will never be called again.

      failure - the failure that occurred.