diff --git a/src/docbkx/ip.xml b/src/docbkx/ip.xml index eaab43ce35..d032ae624a 100644 --- a/src/docbkx/ip.xml +++ b/src/docbkx/ip.xml @@ -206,49 +206,46 @@ TCP is a streaming protocol; this means that some structure has to be provided to data transported over TCP, so the receiver can demarcate the data into discrete messages. - Connection factories are configured to use converters to convert between the message - payload and the bits that are sent over TCP. This is accomplished by providing an - input converter and output converter for inbound and outbound messages respectively. - Four standard converters are provided; the first is ByteArrayCrlfConverter, - which can convert a String or byte array to a stream of bytes followed by carriage - return and linefeed characters (\r\n). This is the default converter and can be used with - telnet as a client, for example. The second is is ByteArrayStxEtxConverter, - which can convert a String or byte array to a stream of bytes preceded by an STX (0x02) and - followed by an ETX (0x03). The third is ByteArrayLengthHeaderConverter, - which can convert a String or byte array to a stream of bytes preceded by a 4 byte binary - length in network byte order. Each of these converts an input stream containing the - corresponding format to a byte array payload. The fourth converter is - JavaSerializationConverter which can be used to convert any - Serializable objects. We expect to provide other serialization technologies but you may also - supply your own by implementing the InputStreamingConverter and - OutputStreamingConverter interfaces. If you do not wish to use - the default converters, you must supply input-converter and - output-converter attributes on the connection factory (example below). - This converter mechanism replaces the previous mechanism of subclassing the - NxxSocketReader and NxxSocketWriter + Connection factories are configured to use (de)serializers to convert between the message + payload and the bits that are sent over TCP. This is accomplished by providing a + deserializer and serializer for inbound and outbound messages respectively. + Four standard (de)serializers are provided; the first is ByteArrayCrlfSerializer, + which can convert a byte array to a stream of bytes followed by carriage + return and linefeed characters (\r\n). This is the default (de)serializer and can be used with + telnet as a client, for example. The second is is ByteArrayStxEtxSerializer, + 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. + 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 + 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. - - - Normally, with shared connections, one would expect the the same wire protocol - to be used for both inbound and outbound messages; however, the configuration - allows them to be different. Note, however that if you only specify one converter - the other direction will use the default converter. - - Connection factories can be configured with a reference to a TcpConnectionInterceptorFactoryChain. Interceptors can be used @@ -277,13 +274,14 @@ + + @@ -294,8 +292,8 @@ port="#{server.port}" single-use="true" so-timeout="10000" - input-converter="serializer" - output-converter="serializer" + deserializer="deserializer" + serializer="serializer" /> @@ -419,6 +417,22 @@ The port. + + serializer + Y + Y + + An implementation of Serializer used to serialize + the payload. Defaults to ByteArrayCrLfSerializer + + + deserializer + Y + Y + + An implementation of Deserializer used to deserialize + the payload. Defaults to ByteArrayCrLfSerializer + using-nio Y @@ -639,8 +653,6 @@ local-address - N - Y On a multi-homed system, for the UDP adapter, specifies an IP address for the interface to which the socket will be bound for reply messages. @@ -735,8 +747,6 @@ so-receive-buffer- size - Y - Y See java.net.DatagramSocket setReceiveBufferSize() for more information.