Cliser

cliser
Class ServerTCPCommunicator

java.lang.Object
  |
  +--cliser.Communicator
        |
        +--cliser.TCPCommunicator
              |
              +--cliser.ServerTCPCommunicator
Direct Known Subclasses:
ConcurrentServerTCPCommunicator, IterativeServerTCPCommunicator

public abstract class ServerTCPCommunicator
extends TCPCommunicator


Constructor Summary
ServerTCPCommunicator(int port)
          explicit constructor
 
Method Summary
abstract  TCPCommunicator accept()
          abstract method for a server Communicator to accept connections PRE: Some client is going to connect to me
 java.net.ServerSocket getServerSocket()
          myServerSocket accessor
protected  java.net.Socket initSocket()
          definition of abstract TCPCommunicator.initSocket() POST: mySocket == null (mySocket will be set by abstract accept()).
 
Methods inherited from class cliser.TCPCommunicator
finalize, getLocalHost, getLocalPort, getRemoteHost, getRemotePort, getSocket, initReaderAndWriter, receive, send, setSocket
 
Methods inherited from class cliser.Communicator
getPort, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerTCPCommunicator

public ServerTCPCommunicator(int port)
explicit constructor
Method Detail

initSocket

protected java.net.Socket initSocket()
definition of abstract TCPCommunicator.initSocket() POST: mySocket == null (mySocket will be set by abstract accept()).
Overrides:
initSocket in class TCPCommunicator

accept

public abstract TCPCommunicator accept()
abstract method for a server Communicator to accept connections PRE: Some client is going to connect to me
Returns:
a TCPCommunicator back to that client

getServerSocket

public final java.net.ServerSocket getServerSocket()
myServerSocket accessor
Returns:
myServerSocket

Cliser

Cliser is open-source freeware distributed under the GNU Public License.