com.interfaceware.chameleon
Class TransportTcpIpClient

java.lang.Object
  extended by com.interfaceware.chameleon.Hl7ClientSocket
      extended by com.interfaceware.chameleon.TransportTcpIpClient
All Implemented Interfaces:
Transport

public class TransportTcpIpClient
extends Hl7ClientSocket
implements Transport

This class is deprecated and should not be used for new applications. This class implements a TCP/IP client for HL7 using the LLP protocol. You can use ClientSocketListener to track events on this object.

See Also:
ClientSocketListener

Field Summary
static int DEFAULT_PORT
          Default port
protected  boolean m_IsConnected
           
protected  ClientSocketListener m_Listener
           
protected  Log m_Log
           
protected  int m_Port
           
 
Constructor Summary
TransportTcpIpClient(int Port, java.lang.String Host, Wrapper AWrapper)
          Constructor
 
Method Summary
 void addClientSocketListener(ClientSocketListener AListener)
          Use this method to add a ClientSocketListener to keep track on events happening on this socket.
 void addLog(Log ALog)
          Use this method to assign the Log object for this socket to log errors to.
 void close()
          Closes the current connection
 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 MessageData)
          Send an HL7 message to the server - the message needs to presented as a string.
 
Methods inherited from class com.interfaceware.chameleon.Hl7ClientSocket
closeConnection, connect, finalize, getAddress, getIp, stopNetworkingThread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default port

See Also:
Constant Field Values

m_IsConnected

protected boolean m_IsConnected

m_Port

protected int m_Port

m_Log

protected Log m_Log

m_Listener

protected ClientSocketListener m_Listener
Constructor Detail

TransportTcpIpClient

public TransportTcpIpClient(int Port,
                            java.lang.String Host,
                            Wrapper AWrapper)
Constructor

See Also:
Wrapper
Method Detail

sendMessage

public void sendMessage(java.lang.String MessageData)
Send an HL7 message to the server - the message needs to presented as a string.

Specified by:
sendMessage in interface Transport
Overrides:
sendMessage in class Hl7ClientSocket

close

public void close()
Closes the current connection


onMessage

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

Overrides:
onMessage in class Hl7ClientSocket

onConnect

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

Overrides:
onConnect in class Hl7ClientSocket

onTransportError

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

Overrides:
onTransportError in class Hl7ClientSocket

onClose

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

Overrides:
onClose in class Hl7ClientSocket

addClientSocketListener

public void addClientSocketListener(ClientSocketListener AListener)
Use this method to add a ClientSocketListener to keep track on events happening on this socket.

See Also:
ClientSocketListener

addLog

public void addLog(Log ALog)
Use this method to assign the Log object for this socket to log errors to.

See Also:
Log