From 23328adf6bda8322dc49830a8d6c5e5b394450c6 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Sat, 1 May 2010 23:38:48 +0000 Subject: [PATCH] INT-1008 Documentation for the Simple Outbound TCP Gateway. --- spring-integration-reference/src/ip.xml | 115 ++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 6 deletions(-) diff --git a/spring-integration-reference/src/ip.xml b/spring-integration-reference/src/ip.xml index 07e8ab84c3..32dd80ea19 100644 --- a/spring-integration-reference/src/ip.xml +++ b/spring-integration-reference/src/ip.xml @@ -195,20 +195,34 @@
- TCP Gateway + TCP Gateways - The simple inbound TCP gateway SimpleTcpNetInboundGateway - uses java.net.Socket for communications. Each connection + The simple inbound TCP gateway SimpleTcpNetInboundGateway + and simple oubound TCP gateway SimpleTcpNetOutboundGateway + use java.net.Socket for communications. Each connection can process a single request/response at a time. - This gateway delegates to a subclass of the TcpNetReceivingChannelAdapter - described above, so please read that section for more information. The difference - is that after constructing a message with the incoming payload and sending + The inbound gateway delegates to a subclass of the TcpNetReceivingChannelAdapter + described above, so please read that section for more information. After + constructing a message with the incoming payload and sending it to the requestChannel, it waits for a response and sends the payload from the response message by writing it to the socket, using the same message format configured for the incoming message. + + The outbound gateway delegates to a TcpNetSendingMessageHandler + described above, so please read that section for more information. After + sending a message over the socket, the thread waits for a response and + constructs a response message with a byte[] payload The incoming + response is decoded using the same + message format configured for the outgoing message. Communications over + the socket are single-threaded. Users should be aware that only one + message can be handled at a time and if another thread attempts to send + a message before the current response has been received, it will block. Only + when the inprocess message receives a response (or times out based on the + socket timeout option) will it proceed. + + + ]]> + A simple oubound TCP gateway; it uses '/r/n' delimited data. +
IP Endpoint Attributes @@ -650,6 +673,86 @@ + + TCP Outbound Gateway Attributes + + + + + + + + Attribute Name + Allowed Values + Attribute Description + + + + + host + + The host name or ip address of the destination. + + + port + + The port to which the gateway connects. + + + receive-buffer-size + + The size of the + buffer used to reassemble incoming messages. Effectively the maximum + message size that can be received. + + + message-format + length-header, stx-etx, crlf, custom + The formatting that the tcp gateway uses for formating + requests and demarcating + incoming responses. Defaults to length-header. + See the discussion above for details about each format. + + + custom-socket- reader-class-name + Subclass of TcpNetSocket- Reader + When message-format is 'custom' the name of the class that + implements the custom format. Must be a subclass of the + TcpNetSocketReader. + + + custom-socket- writer-class-name + Subclass of TcpNetSocket- Writer + When message-format is 'custom' the name of the class that + implements the custom format. Must be a subclass of the + TcpNetSocketWriter. + + + so-timeout + + See java.net.Socket + setSoTimeout() for more information. + + + so-send-buffer-size + + See java.net.Socket + setSendBufferSize() methods for more information. + + + so-receive-buffer- size + + See java.net.Socket + setReceiveBufferSize() for more information. + + + so-keep-alive + true, false + See java.net.Socket. setKeepAlive(). + + + +