What's New in the Sun TCP/IP HL7 Adapter

Dynamic Connection Support

The Dynamic Connection Support feature is added to both TCPIP and HL7 Adapters.

Dynamic Connection support features the following.

  1. Users can provide the host and port details and dynamically connect to the external system.

  2. The following new methods are added.

    1. setHost(String ipaddress or hostname)

    2. setPort(int number)

    3. connect()

    4. connect(String host, int port)

    5. Close()

  3. An environment configuration property called Connection Mode is added.

    The value can be Automatic or Manual.

  4. The Dynamic Connection Support is available only if Connection Mode is Automatic.

    Default Value is Automatic

  5. An exception is generated if the methods setHost, setPort,connect() are invoked when the ConnectionMode is Automatic.

  6. If the connect() method is invoked without invoking setHost() and setPort(). The adapter uses the environment properties to connect to the host and port.

Code in JCD


TCPIPClient_1.connect( "localhost", 9999 );
// send handshake string
TCPIPClient_1.sendEnvelopedMsg( "Sun",getBytes() );
//receive handshake string
byte[] back = TCPIPClient_1.receiveEnvelopedMesg();
...
...
...
TCPIPClient_1.close();
TCPIPClient_1.connect( "129.158.239.67", 9999 );
// send handshake string
TCPIPClient_1.sendEnvelopedMesg( "Sun",getBytes() );
// receive handshake string
back = TCPIPClient_1.receiveEnvelopedMesg();
...
...
....
TCPIPClient_1.client();