Top Description Methods
org.springframework.messaging.tcp

public Interface TcpConnectionHandler<P>

Known Direct Subinterfaces
org.springframework.messaging.simp.stomp.StompTcpConnectionHandler
Type Parameters
<P>
the type of payload for in and outbound messages
Imports
org.springframework.messaging.Message

A contract for managing lifecycle events for a TCP connection including the handling of incoming messages.
Author
Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
afterConnected(TcpConnection<P>
the connection
connection
)

Invoked after a connection is successfully established.

public void
afterConnectFailure(Throwable
the exception
ex
)

Invoked on failure to connect.

public void
afterConnectionClosed()

Invoked after the connection is closed.

public void
handleFailure(Throwable
the exception
ex
)

Handle a failure on the connection.

public void
handleMessage(Message<P>
the message
message
)

Handle a message received from the remote host.

Method Detail

afterConnectedback to summary
public void afterConnected(TcpConnection<P> connection)

Invoked after a connection is successfully established.

Parameters
connection:TcpConnection<P>

the connection

afterConnectFailureback to summary
public void afterConnectFailure(Throwable ex)

Invoked on failure to connect.

Parameters
ex:Throwable

the exception

afterConnectionClosedback to summary
public void afterConnectionClosed()

Invoked after the connection is closed.

handleFailureback to summary
public void handleFailure(Throwable ex)

Handle a failure on the connection.

Parameters
ex:Throwable

the exception

handleMessageback to summary
public void handleMessage(Message<P> message)

Handle a message received from the remote host.

Parameters
message:Message<P>

the message