Interface TcpConnectionHandler<P>

  • Type Parameters:
    P - the type of payload for in and outbound messages
    All Known Subinterfaces:
    ConnectionHandlingStompSession
    All Known Implementing Classes:
    DefaultStompSession

    public interface TcpConnectionHandler<P>
    A contract for managing lifecycle events for a TCP connection including the handling of incoming messages.
    Since:
    4.0
    Author:
    Rossen Stoyanchev
    • Method Detail

      • afterConnected

        void afterConnected​(TcpConnection<P> connection)
        Invoked after a connection is successfully established.
        Parameters:
        connection - the connection
      • handleMessage

        void handleMessage​(Message<P> message)
        Handle a message received from the remote host.
        Parameters:
        message - the message
      • handleFailure

        void handleFailure​(Throwable ex)
        Handle a failure on the connection.
        Parameters:
        ex - the exception