Interface MessageConnector.IMessageConnection.Listener

Enclosing interface:
MessageConnector.IMessageConnection

public static interface MessageConnector.IMessageConnection.Listener
Receives connection readiness, complete inbound messages, writability, and closure.
Since:
4.23
Author:
Eike Stepper
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the peer or transport closes the connection.
    void
    Called once the transport can send and receive.
    void
    received(ByteBuffer data, Runnable releaseAction)
    Delivers one complete framed message and transfers a lease on its storage.
    void
    Called when a previously rejected send may be retried.
  • Method Details

    • ready

      void ready()
      Called once the transport can send and receive.
    • received

      void received(ByteBuffer data, Runnable releaseAction)
      Delivers one complete framed message and transfers a lease on its storage.
      Parameters:
      data - storage whose current position and limit delimit the complete frame
      releaseAction - action that returns or releases the storage
    • writable

      void writable()
      Called when a previously rejected send may be retried.
    • closed

      void closed(Throwable cause)
      Called when the peer or transport closes the connection.
      Parameters:
      cause - the reason for an abnormal closure, or null for an orderly closure