Interface MessageSink

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Frame frame, Callback callback)
    Consumes the WebSocket frame, possibly asynchronously when this method has returned.
    default void
    fail(Throwable failure)
    Fails this MessageSink with the given cause.
  • Method Details

    • accept

      void accept(Frame frame, Callback callback)

      Consumes the WebSocket frame, possibly asynchronously when this method has returned.

      The callback argument must be completed when the frame payload is consumed.

      The demand for more frames must be explicitly invoked, or arranged to be invoked asynchronously, by the implementation of this method, by calling CoreSession.demand().

      Parameters:
      frame - the frame to consume
      callback - the callback to complete when the frame is consumed
    • fail

      default void fail(Throwable failure)

      Fails this MessageSink with the given cause.

      Parameters:
      failure - the cause of the failure