接口 TcpConnectionHandler<P>

  • 类型参数:
    P - the type of payload for in and outbound messages
    所有已知子接口:
    ConnectionHandlingStompSession
    所有已知实现类:
    DefaultStompSession

    public interface TcpConnectionHandler<P>
    A contract for managing lifecycle events for a TCP connection including the handling of incoming messages.
    从以下版本开始:
    4.0
    作者:
    Rossen Stoyanchev
    • 方法详细资料

      • afterConnected

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

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

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