Cliser

cliser
Class IterativeTCPServer

java.lang.Object
  |
  +--cliser.CommunicatorUser
        |
        +--cliser.Server
              |
              +--cliser.TCPServer
                    |
                    +--cliser.IterativeTCPServer

public abstract class IterativeTCPServer
extends TCPServer


Constructor Summary
IterativeTCPServer(java.lang.String service, int port)
          explicit communicator
 
Method Summary
protected  Communicator initCommunicator()
          definition of abstract CommunicatorUser.initCommunicator() PRE: myPort has been initialized.
abstract  void interactWithClient()
          method defined by subclass specifying server's interaction with client PRE: A connection has been accepted.
 void run()
          default iterative server behavior (run forever, accepting connections and performing service).
 
Methods inherited from class cliser.TCPServer
acceptConnection
 
Methods inherited from class cliser.Server
getHost, getPort, getService
 
Methods inherited from class cliser.CommunicatorUser
getCommunicator, receive, send, setCommunicator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterativeTCPServer

public IterativeTCPServer(java.lang.String service,
                          int port)
explicit communicator
Method Detail

initCommunicator

protected Communicator initCommunicator()
definition of abstract CommunicatorUser.initCommunicator() PRE: myPort has been initialized.
Returns:
a new IterativeServerTCPCommunicator listening on myPort.
Overrides:
initCommunicator in class CommunicatorUser

run

public void run()
default iterative server behavior (run forever, accepting connections and performing service).

interactWithClient

public abstract void interactWithClient()
method defined by subclass specifying server's interaction with client PRE: A connection has been accepted. POST: my service has been performed for that connection's client

Cliser

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