sg.edu.nus.peer.management
Class ServerEventManager

java.lang.Object
  extended by sg.edu.nus.util.AbstractPooledSocketServer
      extended by sg.edu.nus.peer.management.AbstractEventManager
          extended by sg.edu.nus.peer.management.ServerEventManager
All Implemented Interfaces:
java.lang.Runnable, PooledSocketServer

public class ServerEventManager
extends AbstractEventManager

Implement the socket server at the bootstrap server, that is responsbile for accepting the incoming socket connections.

Version:
1.0 2005-12-30
Author:
Xu Linhao

Constructor Summary
ServerEventManager(AbstractMainFrame gui, int port, int maxConn)
          Construct a pooled socket server at specified port and with maximum number of incoming connections
 
Method Summary
 void setupHandlers()
          Initiate a set of AbstractPooledSocketHandlers, the number of which is specified by the parameter maxConn.
 
Methods inherited from class sg.edu.nus.peer.management.AbstractEventManager
stop
 
Methods inherited from class sg.edu.nus.util.AbstractPooledSocketServer
acceptConnections, isAlive, run
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerEventManager

public ServerEventManager(AbstractMainFrame gui,
                          int port,
                          int maxConn)
Construct a pooled socket server at specified port and with maximum number of incoming connections

Parameters:
port - the port used for server socket
maxConn - the maximum connections that can be handled simultaneously
Method Detail

setupHandlers

public void setupHandlers()
Description copied from class: AbstractPooledSocketServer
Initiate a set of AbstractPooledSocketHandlers, the number of which is specified by the parameter maxConn.

Specified by:
setupHandlers in interface PooledSocketServer
Specified by:
setupHandlers in class AbstractPooledSocketServer