|
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()
|
Object |
getPayload()
Uses the input converter to obtain the message payload from the connection's input stream. |
int |
getPort()
|
boolean |
isOpen()
|
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(InputStreamingConverter<?> inputConverter)
|
void |
setMapper(TcpMessageMapper mapper)
|
void |
setOutputConverter(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()
void setMapper(TcpMessageMapper mapper)
mapper
- the mappervoid setInputConverter(InputStreamingConverter<?> inputConverter)
inputConverter
- the inputConverter to setvoid setOutputConverter(OutputStreamingConverter<?> outputConverter)
outputConverter
- the outputConverter to set
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |