接口 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
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
afterConnected(TcpConnection<P> connection)
Invoked after a connection is successfully established.void
afterConnectFailure(Throwable ex)
Invoked on failure to connect.void
afterConnectionClosed()
Invoked after the connection is closed.void
handleFailure(Throwable ex)
Handle a failure on the connection.void
handleMessage(Message<P> message)
Handle a message received from the remote host.
方法详细资料
afterConnected
void afterConnected(TcpConnection<P> connection)
Invoked after a connection is successfully established.- 参数:
connection
- the connection
afterConnectFailure
void afterConnectFailure(Throwable ex)
Invoked on failure to connect.- 参数:
ex
- the exception
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
afterConnectionClosed
void afterConnectionClosed()
Invoked after the connection is closed.