Using the Sun HL7 JCA Adapter

TCPIP Outbound Settings

The TCPIP Outbound properties specify general and socket settings (Java Socket Options) for the HL7 JCA Adapter.

Connection Type

Specifies how the eWay establishes the TCP/IP connection.

The choices are:

  • Client: The adapter is in active mode, connecting to an external TCP/IP server (host/port).

  • Server: The adapter is in passive mode, listening on a particular port for an incoming connection request from an external TCP/IP client.

ServerSoTimeout

Applies only when Connection Type is set to Server.

Gets or sets the value of the SO_TIMEOUT socket option for the ServerSocket, used for ServerSocket.accept(). A value of 0 is interpreted as an infinite timeout.

To have effect, this option must be enabled prior to entering the blocking operation. When it is set to a nonzero timeout, calling accept() for ServerSocket blocks for only the specified number of milliseconds. If the timeout expires, a java.net.SocketTimeoutException or java.net.InterruptedIOException is thrown, even though the ServerSocket remains valid. The configured default is 60000; in other words, one minute.

Keep Alive

Specifies whether the client's SO_KEEPALIVE option is enabled or disabled. When the option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours, TCP automatically sends a Keep Alive 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:

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

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

  • 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.

The Keep Alive value choices are:

  • True: The SO_KEEPALIVE socket option is enabled: After prolonged period of inactivity, a keepalive probe is sent automatically, and the socket is either kept open (if the probe fetches an ACK response) or closed (if the probe fetches a RST response or no response).

  • False: The SO_KEEPALIVE socket option is disabled.

Receive Buffer Size

Sets or Gets the value of the SO_RCVBUF option for this Socket. It sets a hint of the size of the underlying buffers used by the platform for incoming network I/O.

When used as Set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.

When used as Get, this must return the actual size of the buffer used by the platform when receiving data on this socket.

The configured default is 8192 (bytes).

Send Buffer Size

Sets or Gets the value of the SO_SNDBUF option for this Socket. It sets a hint of the size of the underlying buffers used by the platform for outgoing network I/O.

When used as Set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.

When used as Get, this must return the actual size of the buffer used by the platform when sending out data on this socket.

The configured default is 8192 (bytes).

SoLinger

Specifies whether the adapter performs a linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. This parameter is used in conjunction with SoLinger Timeout.

The choices are:

  • True: Enables the SO_LINGER socket option, causing a nonzero SoLinger Timeout value to be applied.

  • False: Disables the SO_LINGER socket option.

SoLinger Timeout

Specifies the SoLinger timeout in seconds. This is used in conjunction with the SoLinger parameter.

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

  • 0 (zero) indicates that SoLinger immediately performs a forceful close.

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

  • The default is -1 seconds, which indicates that the SoLinger option is disabled (set as false).

The configured default is -1.

SoTimeout

Sets/Gets SO_TIMEOUT, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.io.InterruptedIOException (or java.net.SocketTimeoutException) is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.

The configured default is 10000; in other words, 10 seconds.

TcpNoDelay

Specifies whether the server's TcpNoDelay option (that is, Nagle's algorithm) is enabled or disabled.

The choices are:

  • True: Indicates that the server allows data packets that are less than the maximum transfer unit (MTU) size to be sent out immediately over the network. A setting of True may 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.

The configured default is False.

Socket Factory Implementation Class Name

Specifies 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 following interface: com.stc.connector.tcpip.model.factory.TCPIPSocketFactory

Host

Specifies the hostname or IP address to use for establishing a HL7 connection. Applies only when Connection Type is set to Client. The configured default is localhost.

Port

Default: 8888

Specifies the port number of the TCP/IP destination. If the Connection Type is Server, it indicates the port number on the local host; if the Connection Type is Client, it indicates the port number of the external Host. The port must be between 0 and 65535.

Backlog

Specifies the maximum length of the queue when creating the ServerSocket. The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.