com.interfaceware.chameleon
Class Hl7ClientSocket

java.lang.Object
  extended by com.interfaceware.chameleon.Hl7ClientSocket
Direct Known Subclasses:
Connection, TransportTcpIpClient

public class Hl7ClientSocket
extends java.lang.Object

This class is deprecated and should not be used.


Constructor Summary
Hl7ClientSocket()
          Create a Client for outgoing connections.
Hl7ClientSocket(long TransportId_)
          Create a Client from a received connnection.
 
Method Summary
 void closeConnection()
          Close a connection
 void connect(java.lang.String Host, int Port)
          Connect to a remote host.
protected  void finalize()
          Frees the connection handle.
 java.lang.String getAddress()
          Get the IP Address as a string
 int getIp()
          Get the raw IP Address
 void onClose(long TransportId)
          Called when a connection closes
 void onConnect(long TransportId)
          Called when a connection has been established
 void onMessage(long TransportId, java.lang.String Message)
          Called when a message arrives
 void onTransportError(long TransportId, int ErrorId, java.lang.String ErrorMessage)
          Called when an error occurs
 void sendMessage(java.lang.String Message)
          Send a message
static void stopNetworkingThread()
          Call this method to stop the networking thread.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hl7ClientSocket

public Hl7ClientSocket()
Create a Client for outgoing connections.

Throws:
ChameleonException

Hl7ClientSocket

public Hl7ClientSocket(long TransportId_)
Create a Client from a received connnection.

Throws:
ChameleonException
Method Detail

finalize

protected void finalize()
                 throws ChameleonException
Frees the connection handle.

Overrides:
finalize in class java.lang.Object
Throws:
ChameleonException

connect

public void connect(java.lang.String Host,
                    int Port)
             throws ChameleonException
Connect to a remote host.

Throws:
ChameleonException

getIp

public int getIp()
Get the raw IP Address

Throws:
ChameleonException

getAddress

public java.lang.String getAddress()
Get the IP Address as a string

Throws:
ChameleonException

sendMessage

public void sendMessage(java.lang.String Message)
                 throws ChameleonException
Send a message

Throws:
ChameleonException

closeConnection

public void closeConnection()
                     throws ChameleonException
Close a connection

Throws:
ChameleonException

onClose

public void onClose(long TransportId)
Called when a connection closes


onMessage

public void onMessage(long TransportId,
                      java.lang.String Message)
Called when a message arrives


onTransportError

public void onTransportError(long TransportId,
                             int ErrorId,
                             java.lang.String ErrorMessage)
Called when an error occurs


onConnect

public void onConnect(long TransportId)
Called when a connection has been established


stopNetworkingThread

public static void stopNetworkingThread()
                                 throws ChameleonException
Call this method to stop the networking thread. This is recommended as the application closes down to have the application shut down gracefully.

Throws:
ChameleonException