|
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 converting the payload
and streaming it to the destination. Requires a TcpListener
to receive incoming messages.
Method Summary | |
---|---|
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()
|
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 |
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. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
---|
void close()
boolean isOpen()
void send(Message<?> message) throws Exception
message
- The message
Exception
Object getPayload() throws Exception
Exception
String getHostName()
String getHostAddress()
int getPort()
void registerListener(TcpListener listener)
listener
- The listenervoid registerSender(TcpSender sender)
sender
- the senderString getConnectionId()
void setSingleUse(boolean singleUse)
singleUse
- the singleUseboolean isSingleUse()
boolean isServer()
void setMapper(TcpMessageMapper mapper)
mapper
- the mapperorg.springframework.commons.serializer.InputStreamingConverter<?> getInputConverter()
void setInputConverter(org.springframework.commons.serializer.InputStreamingConverter<?> inputConverter)
inputConverter
- the inputConverter to setorg.springframework.commons.serializer.OutputStreamingConverter<?> getOutputConverter()
void setOutputConverter(org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter)
outputConverter
- the outputConverter to setTcpListener getListener()
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |