Interface SocketContextListener

public interface SocketContextListener
Receives notification on context events.

None of the messages will be triggered concurrently on this listener; however, different listeners may be notified in parallel.

  • Method Details

    • onNewSocket

      void onNewSocket(SocketContext socketContext, Socket newSocket)
      Called when a new socket is created, but before it is started. This may be used to register a listener on the socket without missing any messages.
    • onError

      void onError(SocketContext socketContext, Throwable t)
      Called when an error occurs. The socket is closed after the first error.
    • onSocketContextClose

      void onSocketContextClose(SocketContext socketContext)
      Called when a socket context is closed. This will only be called once.