Sun Adapter for TCP/IP HL7 User's Guide

TCPIP Outbound Settings — TCP/IP HL7 V2 Outbound Adapter

The following table lists and describes the properties on the TCPIP Outbound Settings page of the Properties Editor accessed from the Connectivity Map. These properties configure the Java socket and server socket options. For more information, see the Javadocs for Java SDK.

Table 17 Connectivity Map - TCPIP Outbound Settings

Name 

Description 

Connection Type

The way the adapter establishes the TCP/IP connection. Select one of the following options: 

  • Client – The adapter connects to an external server (host/port) to establish the connection. The adapter is in active mode.

  • Server – The adapter waits and listens on a certain port for an incoming connection request from an external client. Once the request is received, the adapter accepts the request and establishes the connection. The adapter is in passive mode.

Server is the default setting. Unless you specifically require Client mode, leave the default value. 

ServerSoTimeout

The value (in milliseconds) of the SO_TIMEOUT parameter for ServerSocket. The timeout must be greater than zero (0). A timeout of zero is interpreted as an infinite timeout.

This value is used for the ServerSocket.accept() method. When this option is set to a non-zero timeout, calling accept() for this ServerSocket will block for the configured length of time. If the timeout expires, a java.net.SocketTimeoutException (or java.net.InterruptedIOException) is thrown, but the ServerSocket remains valid.

Enable this option prior to entering the blocking operation. This property is only used when the Connection Type property is set to Server.

Keep Alive

An indicator of whether the client’s SO_KEEPALIVE option is enabled or disabled. Select true to enable SO_KEEPALIVE; otherwise, select false.

When the option is enabled for a TCP socket and no data has been exchanged across the socket in either direction for two hours, TCP automatically sends a KEEPALIVE probe to the peer (the actual value is implementation dependent). This probe is a TCP segment to which the peer must respond. One of three responses is expected: 

  1. The peer responds with the expected ACK. The application is not notified (since everything is OK). TCP will send another probe following another two hours of inactivity.

  2. The peer responds with an RST, which tells the local TCP that the peer host has crashed and rebooted. The socket is closed.

  3. There is no response from the peer. The socket is closed. The purpose of this option is to detect if the peer host has crashed. This is used for the accepted client Socket.


Note –

For some properties, the server socket itself does not have direct property settings associated with it. Instead, the properties map to the accepted client socket.


Receive Buffer Size

A number indicating the receive buffer size. This is the value of the SO_RCVBUF option for the current socket, which is the buffer size used by the operating system for input on this socket. It provides an estimate of the size of the underlying buffers used by the platform for incoming network I/O.  

When used in set mode, this is a suggestion for the kernel from the application regarding the size of buffers to use for the data to be received over the socket. When used in get mode, this must return the actual size of the buffer used by the platform when receiving data on this socket. 

Send Buffer Size

A number indicating the send buffer size. This is the value of the SO_SNDBUF option for the current socket, which is the buffer size used by the operating system for output on this socket. It provides an estimate of the size of the underlying buffers used by the platform for outgoing network I/O.  

When used in set mode, this is a suggestion for the kernel from the application regarding the size of buffers to use for the data to be sent over the socket. When used in get mode, this must return the actual size of the buffer used by the platform when sending out data on this socket. 

SoLinger

An indicator of whether the adapter performs a “linger-on-close” timeout. This option disables or enables an immediate return from a call to the close() method for a TCP Socket. To enable the linger-on-close timeout, select true; otherwise, select false.

If you enable this property, specify the maximum length of the timeout in the SoLinger Timeout property.

SoLinger Timeout

The server’s linger–on–close timeout in seconds. Use SoLinger Timeout when SoLinger is set to true (see the description for SoLinger above). You can specify an integer between -1 and 65535. The default is -1 seconds, which indicates that the SoLinger option is disabled.

When SoLinger is set to true, the SoLinger Timeout value indicates the following:

  • A non-zero integer means that calling close() will block pending the transmission and acknowledgement of all data written to the peer. When all data is written, the socket is closed gracefully. Upon reaching the linger timeout value specified here, the socket is closed forcefully with a TCP RST. If the specified timeout value exceeds 65,535 it will be reduced to 65,535.

  • A zero integer means that a forceful close is performed immediately.

SoTimeout

The value of the SoTimeout in milliseconds. You can enter a value greater than or equal to zero (0). When set to zero (0), the timeout is infinite.

With this option set to a non-zero value, calling the read() method on the input stream associated with this socket will block for only the configured length of time. If the timeout expires, a java.io.InterruptedIOException or java.net.SocketTimeoutException is thrown, but the socket remains valid.

Enable this option prior to entering the blocking operation. 

TcpNoDelay

An indicator of whether data packets that are smaller than the maximum transfer unit (MTU) size are sent out immediately over the network (this refers to Nagle’s algorithm). Select one of the following options: 

  • True – Indicates that the server allows data packets that are smaller than the MTU size to be sent out immediately over the network. This can improve performance for higher-speed networks.

  • False– Indicates that the server does not allow data packets that are less than the MTU size be sent out immediately over the network.

    This is used for the accepted client socket.

Socket Factory Implementation Class Name

The name of the Java class that implements the socket factory. This class is used to create the socket. If you have provided your own socket implementation, enter the name of the Java class that contains this implementation here. The factory implementation class must implement the com.stc.connector.tcpip.model.factory.TCPIPSocketFactory interface.

The default value is com.stc.connector.tcpip.model.factory.TCPIPSocketFactoryImpl