|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.ip.tcp.connection.AbstractTcpConnection
public abstract class AbstractTcpConnection
Base class for TcpConnections. TcpConnections are established by client connection factories (outgoing) or server connection factories (incoming).
| Field Summary | |
|---|---|
protected java.lang.String |
connectionId
|
protected Deserializer |
deserializer
|
protected TcpListener |
listener
|
protected org.apache.commons.logging.Log |
logger
|
protected TcpMessageMapper |
mapper
|
protected TcpSender |
sender
|
protected Serializer |
serializer
|
protected boolean |
server
|
protected boolean |
singleUse
|
| Constructor Summary | |
|---|---|
AbstractTcpConnection(java.net.Socket socket,
boolean server,
boolean lookupHost)
|
|
| Method Summary | |
|---|---|
void |
afterSend(Message<?> message)
|
void |
close()
Closes this connection. |
protected void |
closeConnection()
If we have been intercepted, propagate the close from the outermost interceptor; otherwise, just call close(). |
java.lang.String |
getConnectionId()
|
long |
getConnectionSeq()
|
Deserializer<?> |
getDeserializer()
|
java.lang.String |
getHostAddress()
|
java.lang.String |
getHostName()
|
TcpListener |
getListener()
|
TcpMessageMapper |
getMapper()
|
Serializer<?> |
getSerializer()
|
boolean |
isServer()
|
boolean |
isSingleUse()
|
void |
registerListener(TcpListener listener)
Sets the listener that will receive incoming Messages. |
void |
registerSender(TcpSender sender)
Registers a sender. |
void |
setDeserializer(Deserializer<?> deserializer)
|
void |
setMapper(TcpMessageMapper mapper)
|
void |
setSerializer(Serializer<?> serializer)
|
void |
setSingleUse(boolean singleUse)
When true, the socket is used once and discarded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.integration.ip.tcp.connection.TcpConnection |
|---|
getPayload, getPort, isOpen, send |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Field Detail |
|---|
protected org.apache.commons.logging.Log logger
protected Deserializer deserializer
protected Serializer serializer
protected TcpMessageMapper mapper
protected TcpListener listener
protected TcpSender sender
protected boolean singleUse
protected final boolean server
protected java.lang.String connectionId
| Constructor Detail |
|---|
public AbstractTcpConnection(java.net.Socket socket,
boolean server,
boolean lookupHost)
| Method Detail |
|---|
public void afterSend(Message<?> message)
throws java.lang.Exception
java.lang.Exceptionpublic void close()
close in interface TcpConnectionprotected void closeConnection()
public TcpMessageMapper getMapper()
public void setMapper(TcpMessageMapper mapper)
setMapper in interface TcpConnectionmapper - the mapper to setpublic Deserializer<?> getDeserializer()
getDeserializer in interface TcpConnectionpublic void setDeserializer(Deserializer<?> deserializer)
setDeserializer in interface TcpConnectiondeserializer - the deserializer to setpublic Serializer<?> getSerializer()
getSerializer in interface TcpConnectionpublic void setSerializer(Serializer<?> serializer)
setSerializer in interface TcpConnectionserializer - the serializer to setpublic void registerListener(TcpListener listener)
TcpConnection
registerListener in interface TcpConnectionlistener - the listener to setpublic void registerSender(TcpSender sender)
TcpConnection
registerSender in interface TcpConnectionsender - the sender to setpublic TcpListener getListener()
getListener in interface TcpConnectionpublic void setSingleUse(boolean singleUse)
TcpConnection
setSingleUse in interface TcpConnectionsingleUse - true if this socket is to used once and
discarded.public boolean isSingleUse()
isSingleUse in interface TcpConnectionpublic boolean isServer()
isServer in interface TcpConnectionpublic long getConnectionSeq()
getConnectionSeq in interface TcpConnectionpublic java.lang.String getHostAddress()
getHostAddress in interface TcpConnectionpublic java.lang.String getHostName()
getHostName in interface TcpConnectionpublic java.lang.String getConnectionId()
getConnectionId in interface TcpConnection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||