Sun Adapter for TCP/IP HL7

com.stc.connector.tcpip.model.client
Class TCPIPSocket

java.lang.Object
  extended by com.stc.connector.tcpip.model.client.TCPIPSocket

public class TCPIPSocket
extends java.lang.Object

This class represents a java Socket API. It is used to establish the physical tcpip connetion. For more detailed method description, please refer the corresponding parts of java.net.Socket.

Version:
cvs revision: $Revision: 1.6 $ Last Modified: $Date: 2008/03/03 15:35:59 $
Author:
Harry Liu

Field Summary
static java.lang.String version
           
 
Constructor Summary
TCPIPSocket()
          Constructor of TCPIPSocket
 
Method Summary
 void close()
          Closes the Socket.
 void connect(java.net.InetAddress address, int port)
          Creates the Socket object.
 void connect(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)
          Creates the Socket object.
 void connect(java.lang.String host, int port)
          Creates the Socket object.
 void connect(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)
          Creates the Socket object.
 java.net.Socket getSocket()
          Returns a Socket instance.
 void setTCPIPSocketFactory(TCPIPSocketFactory socketFactory)
          Sets TCPIPSocketFactory.
 void setTCPIPSocketFactoryClassName(java.lang.String socketFactoryClassName)
          Sets TCPIPSocketFactoryClassName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values
Constructor Detail

TCPIPSocket

public TCPIPSocket()
Constructor of TCPIPSocket

Method Detail

getSocket

public java.net.Socket getSocket()
Returns a Socket instance.

Returns:
Socket instance

close

public void close()
           throws java.io.IOException
Closes the Socket.

Throws:
java.io.IOException - on error

connect

public void connect(java.net.InetAddress address,
                    int port)
             throws java.io.IOException
Creates the Socket object.

Parameters:
address - InetAddress of the host
port - The port number
Throws:
java.io.IOException - on error

connect

public void connect(java.lang.String host,
                    int port)
             throws java.net.UnknownHostException,
                    java.io.IOException
Creates the Socket object.

Parameters:
host - The host name
port - The port number
Throws:
java.net.UnknownHostException - on error
java.io.IOException - on error

connect

public void connect(java.net.InetAddress address,
                    int port,
                    java.net.InetAddress localAddr,
                    int localPort)
             throws java.io.IOException
Creates the Socket object.

Parameters:
address - InetAddress of the host
port - The port number
localAddr - InetAddress of the local side
localPort - The port number of the local side
Throws:
java.io.IOException - on error

connect

public void connect(java.lang.String host,
                    int port,
                    java.net.InetAddress localAddr,
                    int localPort)
             throws java.net.UnknownHostException,
                    java.io.IOException
Creates the Socket object.

Parameters:
host - The host name
port - The port number
localAddr - InetAddress of the local side
localPort - The port number of the local side
Throws:
java.net.UnknownHostException - on error
java.io.IOException - on error

setTCPIPSocketFactory

public void setTCPIPSocketFactory(TCPIPSocketFactory socketFactory)
                           throws java.io.IOException
Sets TCPIPSocketFactory.

Parameters:
socketFactory - TCPIPSocketFactory instance
Throws:
java.io.IOException - on error

setTCPIPSocketFactoryClassName

public void setTCPIPSocketFactoryClassName(java.lang.String socketFactoryClassName)
                                    throws java.io.IOException
Sets TCPIPSocketFactoryClassName.

Parameters:
socketFactoryClassName - The class name
Throws:
java.io.IOException - on error

Sun Adapter for TCP/IP HL7