diff --git a/src/docbkx/ip.xml b/src/docbkx/ip.xml index fae46ef0ae..10c94eee45 100644 --- a/src/docbkx/ip.xml +++ b/src/docbkx/ip.xml @@ -26,10 +26,15 @@ The choice of which to use in what circumstances is described below. - A simple inbound TCP gateway is provided; this allows for simple request/response processing. While + A simple inbound TCP gateway is provided; this allows for simple request/response processing. While the gateway can support any number of connections, each connection can only process serially. The thread that reads from the socket waits for, and sends, the response before reading again. + + A simple outbound TCP gateway is provided; this allows for simple request/response processing. Each + request is processed serially. The calling thread blocks on the socket until either a response is received + or an I/O error occurs. Requests are single-threaded over the socket. +
UDP Adapters @@ -147,12 +152,15 @@ 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. - Three standard message formats are provided for this purpose; you can also provide code - for your own custom format. The first of the three standard formats is length-header, in which case a 4 byte - length header precedes the data; this is the default. The second is stx-etx in which the message + Four standard message formats are provided for this purpose; you can also provide code + for your own custom format. The first of the four standard formats is 'length-header', in which case a 4 byte + length header precedes the data; this is the default. The second is 'stx-etx' in which the message data is preceded by an STX (0x02) character and terminated with an ETX (0x03) character. - The third is crlf in which the message is terminated with a carriage return and line feed - (\r\n). The first format (the default) is likely to be the most performant. This is because + The third is 'crlf' in which the message is terminated with a carriage return and line feed + (\r\n). These three formats require a byte array or String payload outbound endpoints; inbound + endpoints produce messages with byte array payloads. The fourth format is 'serialized' wherby + standard java serialization is used; payloads must implement Serializable. + For the simple formats, the first (the default) is likely to be the most performant. This is because we can determine exactly how many bytes to read to obtain the complete message. The other two formats require examining each byte to determine if the end of the message has been received. The length-header format can also handle binary data. The other two formats can only handle @@ -221,7 +229,8 @@ 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. + socket timeout option) will it proceed. If an error occurs while reading the + response, the socket will be closed, regardless of the close attribute. message-format Y N - length-header, stx-etx, crlf, custom + length-header, stx-etx, crlf, serialized, custom The formatting that the tcp adapter uses so the receiver can demarcate messages. Defaults to length-header. See the discussion above for details about each format. @@ -443,6 +452,17 @@ See java.net.Socket. setTrafficClass(). + + 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. + For a multicast adapter it is also used to determine which interface + the multicast packets will be sent over. Not applicable to the TCP + adapter. + @@ -545,7 +565,7 @@ message-format Y N - length-header, stx-etx, crlf, custom + length-header, stx-etx, crlf, serialized, custom The formatting that the tcp adapter uses so the adapter can demarcate messages. Defaults to length-header. See the discussion above for details about each format. @@ -590,6 +610,22 @@ true, false See java.net.Socket. setKeepAlive(). + + local-address + Y + Y + + On a multi-homed system, specifies an IP address + for the interface to which the socket will be bound. + + + close + Y + N + + If set to true, instructs the adapter to close the socket + after receiving a message. Defaults to false. + @@ -598,8 +634,8 @@ - - + + Attribute Name @@ -628,7 +664,7 @@ message-format - length-header, stx-etx, crlf, custom + length-header, stx-etx, crlf, serialized, custom The formatting that the tcp gateway uses for demarcating incoming requests and formatting responses. Defaults to length-header. See the discussion above for details about each format. @@ -670,6 +706,18 @@ true, false See java.net.Socket. setKeepAlive(). + + local-address + + On a multi-homed system, specifies an IP address + for the interface to which the socket will be bound. + + + close + + If set to true, instructs the gateway to close the socket + after sending the reply to a message. Defaults to false. + @@ -678,8 +726,8 @@ - - + + Attribute Name @@ -707,7 +755,7 @@ message-format - length-header, stx-etx, crlf, custom + length-header, stx-etx, crlf, serialized, custom The formatting that the tcp gateway uses for formating requests and demarcating incoming responses. Defaults to length-header. @@ -750,6 +798,12 @@ true, false See java.net.Socket. setKeepAlive(). + + close + + If set to true, instructs the adapter to close the socket + after receiving the reply to a message. Defaults to false. +