|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.integration.ip.tcp.connection.AbstractTcpConnectionInterceptor
public abstract class AbstractTcpConnectionInterceptor
Base class for TcpConnectionIntercepters; passes all method calls through
to the underlying TcpConnection.
| Constructor Summary | |
|---|---|
AbstractTcpConnectionInterceptor()
|
|
| Method Summary | |
|---|---|
void |
addNewConnection(TcpConnection connection)
When we are using sockets owned by a TcpListener, this
method is called each time a new connection is made. |
void |
close()
Closes the connection. |
String |
getConnectionId()
|
String |
getHostAddress()
|
String |
getHostName()
|
org.springframework.commons.serializer.InputStreamingConverter<?> |
getInputConverter()
|
TcpListener |
getListener()
|
org.springframework.commons.serializer.OutputStreamingConverter<?> |
getOutputConverter()
|
Object |
getPayload()
Uses the input converter to obtain the message payload from the connection's input stream. |
int |
getPort()
|
TcpConnection |
getTheConnection()
Returns the underlying connection (or next interceptor) |
boolean |
isOpen()
|
boolean |
isServer()
|
boolean |
isSingleUse()
|
boolean |
onMessage(Message<?> message)
Called by a TCPConnection when a new message arrives. |
void |
registerListener(TcpListener listener)
Sets the listener that will receive incoming Messages. |
void |
registerSender(TcpSender sender)
Registers a sender. |
void |
removeDeadConnection(TcpConnection connection)
When we are using sockets owned by a TcpListener, this
method is called each time a connection is closed. |
void |
run()
|
void |
send(Message<?> message)
Converts and sends the message. |
void |
setInputConverter(org.springframework.commons.serializer.InputStreamingConverter<?> inputConverter)
|
void |
setMapper(TcpMessageMapper mapper)
|
void |
setOutputConverter(org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter)
|
void |
setSingleUse(boolean singleUse)
When true, the socket is used once and discarded. |
void |
setTheConnection(TcpConnection theConnection)
Sets the underlying connection (or next interceptor) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTcpConnectionInterceptor()
| Method Detail |
|---|
public void close()
TcpConnection
close in interface TcpConnectionpublic boolean isOpen()
isOpen in interface TcpConnection
public Object getPayload()
throws Exception
TcpConnection
getPayload in interface TcpConnectionExceptionpublic String getHostName()
getHostName in interface TcpConnectionpublic String getHostAddress()
getHostAddress in interface TcpConnectionpublic int getPort()
getPort in interface TcpConnectionpublic void registerListener(TcpListener listener)
TcpConnection
registerListener in interface TcpConnectionlistener - The listenerpublic void registerSender(TcpSender sender)
TcpConnection
registerSender in interface TcpConnectionsender - the senderpublic String getConnectionId()
getConnectionId in interface TcpConnectionpublic boolean isSingleUse()
isSingleUse in interface TcpConnectionpublic void run()
run in interface Runnablepublic void setSingleUse(boolean singleUse)
TcpConnection
setSingleUse in interface TcpConnectionsingleUse - the singleUsepublic void setMapper(TcpMessageMapper mapper)
setMapper in interface TcpConnectionmapper - the mapperpublic org.springframework.commons.serializer.InputStreamingConverter<?> getInputConverter()
getInputConverter in interface TcpConnectionpublic void setInputConverter(org.springframework.commons.serializer.InputStreamingConverter<?> inputConverter)
setInputConverter in interface TcpConnectioninputConverter - the inputConverter to setpublic org.springframework.commons.serializer.OutputStreamingConverter<?> getOutputConverter()
getOutputConverter in interface TcpConnectionpublic void setOutputConverter(org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter)
setOutputConverter in interface TcpConnectionoutputConverter - the outputConverter to setpublic boolean isServer()
isServer in interface TcpConnectionpublic boolean onMessage(Message<?> message)
TcpListener
onMessage in interface TcpListenermessage - The message.
public void send(Message<?> message)
throws Exception
TcpConnection
send in interface TcpConnectionmessage - The message
Exceptionpublic TcpConnection getTheConnection()
public void setTheConnection(TcpConnection theConnection)
setTheConnection in interface TcpConnectionInterceptortheConnection - the connectionpublic TcpListener getListener()
getListener in interface TcpConnectionpublic void addNewConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a new connection is made.
addNewConnection in interface TcpSenderconnection - The connection.public void removeDeadConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a connection is closed.
removeDeadConnection in interface TcpSenderconnection - The connection.
|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||