com.interfaceware.chameleon
Class TransportTcpIpServer

java.lang.Object
  extended by com.interfaceware.chameleon.Hl7ServerSocket
      extended by com.interfaceware.chameleon.TransportTcpIpServer

public class TransportTcpIpServer
extends Hl7ServerSocket

This class is deprecated and should not be used for new applications. It will most likely be removed by about 2010. This class handles TCPIP connections for a server. The constructor instantiates a server socket and which listens for and accepts client connections. Upon accepting a connection, a client socket is created, which is used to instantiate a Connection thread for data input/output.


Field Summary
protected static int DEFAULT_PORT
           
protected static char LINE_FEED
           
protected  ServerSocketListener m_Listener
           
protected  Log m_Log
           
protected  int m_Port
           
protected  Wrapper m_Wrapper
           
 
Constructor Summary
TransportTcpIpServer()
          Default constructor.
TransportTcpIpServer(int Port, Wrapper AWrapper)
          The main constructor.
 
Method Summary
 void addLog(Log ALog)
          Assign an object which implements the Log interface.
 void addServerSocketListener(ServerSocketListener AListener)
          Assign an object which implements ServerSocketListener.
protected  void errorEvent(java.lang.Exception Error, java.lang.String Description)
          Logs an error.
protected  void listenEvent()
          Invokes the onListen event on the ServerSocketListener object.
 void onError(int ErrorId, java.lang.String ErrorMessage)
          Called when an error occurs.
 Hl7ClientSocket onNewConnection(long TransportId)
          Called when there is a new connection.
 int port()
          The TCP/IP port this socket is listening on.
protected  void println(java.lang.String Description)
          Print a line to the log.
 
Methods inherited from class com.interfaceware.chameleon.Hl7ServerSocket
closeConnection, finalize, hardCloseConnection, listen, onClose, onMessage, onTransportError, sendMessage, stopListening, stopNetworkingThread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_FEED

protected static final char LINE_FEED
See Also:
Constant Field Values

DEFAULT_PORT

protected static final int DEFAULT_PORT
See Also:
Constant Field Values

m_Port

protected int m_Port

m_Log

protected Log m_Log

m_Listener

protected ServerSocketListener m_Listener

m_Wrapper

protected Wrapper m_Wrapper
Constructor Detail

TransportTcpIpServer

public TransportTcpIpServer()
Default constructor.


TransportTcpIpServer

public TransportTcpIpServer(int Port,
                            Wrapper AWrapper)
The main constructor.

Method Detail

println

protected void println(java.lang.String Description)
Print a line to the log.


onNewConnection

public Hl7ClientSocket onNewConnection(long TransportId)
Called when there is a new connection.

Overrides:
onNewConnection in class Hl7ServerSocket

listenEvent

protected void listenEvent()
Invokes the onListen event on the ServerSocketListener object.


onError

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

Overrides:
onError in class Hl7ServerSocket

errorEvent

protected void errorEvent(java.lang.Exception Error,
                          java.lang.String Description)
Logs an error.


addServerSocketListener

public void addServerSocketListener(ServerSocketListener AListener)
Assign an object which implements ServerSocketListener.


addLog

public void addLog(Log ALog)
Assign an object which implements the Log interface.


port

public int port()
The TCP/IP port this socket is listening on.