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 Summary
Modifier and TypeMethodDescriptionvoid
onError
(SocketContext socketContext, Throwable t) Called when an error occurs.void
onNewSocket
(SocketContext socketContext, Socket newSocket) Called when a new socket is created, but before it is started.void
onSocketContextClose
(SocketContext socketContext) Called when a socket context is closed.
-
Method Details
-
onNewSocket
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
Called when an error occurs. The socket is closed after the first error. -
onSocketContextClose
Called when a socket context is closed. This will only be called once.
-