|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TcpConnection
An abstraction over Socket
and SocketChannel
that
sends Message
objects by serializing the payload
and streaming it to the destination. Requires a TcpListener
to receive incoming messages.
Method Summary | |
---|---|
void |
close()
Closes the connection. |
java.lang.String |
getConnectionId()
|
org.springframework.core.serializer.Deserializer<?> |
getDeserializer()
|
java.lang.String |
getHostAddress()
|
java.lang.String |
getHostName()
|
TcpListener |
getListener()
|
java.lang.Object |
getPayload()
Uses the deserializer to obtain the message payload from the connection's input stream. |
int |
getPort()
|
org.springframework.core.serializer.Serializer<?> |
getSerializer()
|
long |
incrementAndGetConnectionSequence()
|
boolean |
isOpen()
|
boolean |
isServer()
|
boolean |
isSingleUse()
|
void |
registerListener(TcpListener listener)
Sets the listener that will receive incoming Messages. |
void |
registerSender(TcpSender sender)
Registers a sender. |
void |
send(Message<?> message)
Converts and sends the message. |
void |
setDeserializer(org.springframework.core.serializer.Deserializer<?> deserializer)
|
void |
setMapper(TcpMessageMapper mapper)
|
void |
setSerializer(org.springframework.core.serializer.Serializer<?> serializer)
|
void |
setSingleUse(boolean singleUse)
When true, the socket is used once and discarded. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
---|
void close()
boolean isOpen()
void send(Message<?> message) throws java.lang.Exception
message
- The message
java.lang.Exception
java.lang.Object getPayload() throws java.lang.Exception
java.lang.Exception
java.lang.String getHostName()
java.lang.String getHostAddress()
int getPort()
void registerListener(TcpListener listener)
listener
- The listenervoid registerSender(TcpSender sender)
sender
- the senderjava.lang.String getConnectionId()
void setSingleUse(boolean singleUse)
singleUse
- the singleUseboolean isSingleUse()
boolean isServer()
void setMapper(TcpMessageMapper mapper)
mapper
- the mapperorg.springframework.core.serializer.Deserializer<?> getDeserializer()
void setDeserializer(org.springframework.core.serializer.Deserializer<?> deserializer)
deserializer
- the deserializer to setorg.springframework.core.serializer.Serializer<?> getSerializer()
void setSerializer(org.springframework.core.serializer.Serializer<?> serializer)
serializer
- the serializer to setTcpListener getListener()
long incrementAndGetConnectionSequence()
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |