diff --git a/src/docbkx/ip.xml b/src/docbkx/ip.xml index d032ae624a..8d75ba1834 100644 --- a/src/docbkx/ip.xml +++ b/src/docbkx/ip.xml @@ -22,9 +22,6 @@ TCP inbound and outbound adapters are provided TcpSendingMessageHandler sends messages over TCP. TcpReceivingChannelAdapter receives messages over TCP. - If you have been using an earlier 2.0 milestone, note that the adapters are no longer configured - with connection options directly; instead, they are given - a reference to a connection factory. See below. An inbound TCP gateway is provided; this allows for simple request/response processing. While @@ -36,7 +33,8 @@ An outbound TCP gateway is provided; this allows for simple request/response processing. If the associated connection factory is configured for single use connections, a new connection is immediately created for each new request. Otherwise, if the connection is in use, - the calling thread blocks on the connection until either a response is received or an I/O error occurs. + the calling thread blocks on the connection until either a response is received or a timeout + or I/O error occurs.
@@ -138,7 +136,7 @@ any incoming messages received on connections created by the outbound adapter. - A server connection factory is used by an inbound channel adapter (in fact + A server connection factory is used by an inbound channel adapter or gateway (in fact the connection factory will not function without one). A reference to a server connection factory can also be provided to an outbound adapter; that adapter can then be used to send replies to incoming messages to the same connection. @@ -216,32 +214,38 @@ which can convert a byte array to a stream of bytes preceded by an STX (0x02) and followed by an ETX (0x03). The third is ByteArrayLengthHeaderSerializer, which can convert a byte array to a stream of bytes preceded by a 4 byte binary - length in network byte order. For backwards compatibility, connections using any of these - three serializers will also accept a String which will be converted to a byte array first. + length in network byte order. Each of these is a subclass of + AbstractByteArraySerializer which implements both + org.springframework.core.serializer.Serializer and + org.springframework.core.serializer.Deserializer. + For backwards compatibility, connections using any subclass of + AbstractByteArraySerializer for serialization + will also accept a String which will be converted to a byte array first. Each of these (de)serializers converts an input stream containing the corresponding format to a byte array payload. The fourth standard serializer is - org.springframework.common.serializer.DefaultSerializer which can be used to convert any - Serializable objects using java serialization. - org.springframework.common.serializer.DefaultDeserializer is provided for - inbound deserialization. - We expect to provide other serialization technologies but you may also - supply your own by implementing the Deserializer and - Serializer interfaces. If you do not wish to use - the default (de)serializers, you must supply serializer and + org.springframework.core.serializer.DefaultSerializer which can be + used to convert Serializable objects using java serialization. + org.springframework.core.serializer.DefaultDeserializer is provided for + inbound deserialization of streams containing Serializable objects. + To implement a custom (de)serializer pair, implement the + org.springframework.core.serializer.Deserializer and + org.springframework.core.serializer.Serializer interfaces. If you do not wish to use + the default (de)serializer (ByteArrayCrLfSerializer), you must supply + serializer and deserializer attributes on the connection factory (example below). - + + ]]> A server connection factory that uses java.net.Socket connections and uses Java serialization on the wire. @@ -253,7 +257,7 @@ Further documentation to follow. - For a full reference of the attributes available on connection factories, see the + For full details of the attributes available on connection factories, see the reference at the end of this section.
@@ -265,7 +269,7 @@ connection-factory and channel. The channel attribute specifies the channel on which messages arrive at an outbound adapter and on which messages are placed by an inbound adapter. - The connection factory indicates which connection factory is to be used to + The connection-factory attribute indicates which connection factory is to be used to manage connections for the adapter. While both inbound and outbound adapters can share a connection factory, server connection factories are always 'owned' by an inbound adapter; client connection factories are always 'owned' by an @@ -274,14 +278,16 @@ - + + @@ -292,8 +298,8 @@ port="#{server.port}" single-use="true" so-timeout="10000" - deserializer="deserializer" - serializer="serializer" + deserializer="javaDeserializer" + serializer="javaSerializer" /> @@ -324,7 +330,8 @@ at the server and placed on channel 'loop'. Since 'loop' is the input channel for 'outboundServer' the message is simply looped back over the same connection and received by - 'inboundClient' and deposited in channel 'replies'. + 'inboundClient' and deposited in channel 'replies'. Java + serialization is used on the wire.
@@ -336,15 +343,15 @@ can process a single request/response at a time. - After constructing a message with the incoming payload and sending - it to the requestChannel, it waits for a response and sends the payload + The intbound gateway, after constructing a message with the incoming payload and sending + it to the requestChannel, waits for a response and sends the payload from the response message by writing it to the connection. - After sending a message over the connection, the thread waits for a response and - constructs a response message + The outbound gateway, after sending a message over the connection, waits for a response and + constructs a response message and puts in on the reply channel. Communications over the connections are single-threaded. Users should be aware that only one - message can be handled at a time and if another thread attempts to send + 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 until any previous requests are complete (or time out). If, however, the client connection factory is configured for single-use connections @@ -358,8 +365,8 @@ connection-factory="cfServer" reply-timeout="10000" />]]> - A simple inbound TCP gateway; if a default connection factory is used, - messages will be \r\n delimited data and the gateway can be + A simple inbound TCP gateway; if a connection factory configured with the default + (de)serializer is used, messages will be \r\n delimited data and the gateway can be used by a simple client such as telnet. @@ -556,7 +563,7 @@ UDP Outbound Channel Adapter Attributes - + @@ -673,7 +680,7 @@
UDP Inbound Channel Adapter Attributes - +