com.ibm.etill.framework.io
Class ServerSocketComPoint

java.lang.Object
  |
  +--com.ibm.etill.framework.io.ServerSocketComPoint
All Implemented Interfaces:
ComPoint
Direct Known Subclasses:
FrameworkServerComPoint

public abstract class ServerSocketComPoint
extends Object
implements ComPoint

This is an abstract server ComPoint class for Socket based communications. This class uses an instantiated ServerSocket object to generate socket connections to the Server. The class is used to create concrete classes that establish connections for specific ETillConnection objects. Thus, a concrete class need only override the establishConnection() method.


Fields inherited from interface com.ibm.etill.framework.io.ComPoint
COMPOINT_CLOSED, COMPOINT_OPEN
 
Constructor Summary
ServerSocketComPoint(int port)
          Default Constructor
ServerSocketComPoint(int port, int timeout)
          Default Constructor
 
Method Summary
 Socket accept()
          accept() - Listen on a ServerSocket
 void close()
          close() - Closes a ServerSocket
 String getClassName()
          getClassName()
 int getLock()
           
 int getPort()
          getPort() -- Returns the port on which this ServerSocket is listening.
 ServerSocket getServerSocket()
          getServerSocket() -- Returns the Server Socket Object.
 int getStatus()
           
 int getTimeOut()
          getTimeOut()
 void open()
          open() - Opens a ServerSocket
 void setClassName(String name)
          setClassName()
 void setLock(int aLock)
           
 String toString()
          toString() -- converts an ServerSocketComPoint into a printable string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.etill.framework.io.ComPoint
establishConnection
 

Constructor Detail

ServerSocketComPoint

public ServerSocketComPoint(int port)
Default Constructor
Parameters:
listeningPoint - - An instantiated ServerSocket

ServerSocketComPoint

public ServerSocketComPoint(int port,
                            int timeout)
Default Constructor
Parameters:
listeningPoint - - An instantiated ServerSocket
Method Detail

getTimeOut

public int getTimeOut()
getTimeOut()

getClassName

public String getClassName()
getClassName()

setClassName

public void setClassName(String name)
setClassName()

open

public void open()
          throws IOException
open() - Opens a ServerSocket

toString

public String toString()
toString() -- converts an ServerSocketComPoint into a printable string
Overrides:
toString in class Object

getPort

public int getPort()
getPort() -- Returns the port on which this ServerSocket is listening.

getServerSocket

public ServerSocket getServerSocket()
getServerSocket() -- Returns the Server Socket Object.

accept

public Socket accept()
              throws IOException
accept() - Listen on a ServerSocket

close

public void close()
           throws IOException
close() - Closes a ServerSocket

setLock

public void setLock(int aLock)

getLock

public int getLock()

getStatus

public int getStatus()