org.bluesock.bluemud.driver
Class Server

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.bluesock.bluemud.driver.Server
All Implemented Interfaces:
java.lang.Runnable

public class Server
extends java.lang.Thread

Skeleton server that executes as a daemon thread and listens on a given port, binding connected sockets to Communicator and, ultimately, User objects. A ConnectEvent is then generated. Note: There's almost zero error handling at this point. Most errors are ignored.


Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
(package private) Server(int desiredPort)
          Constructor
 
Method Summary
 void run()
          Enters a loop listening for new connections on the master socket on the listening port.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Server

Server(int desiredPort)
Constructor
Parameters:
desiredPort - - The port on which this server should listen.
Method Detail

run

public void run()
Enters a loop listening for new connections on the master socket on the listening port. When a client connects, we create a new socket for the connected client and associate them with a SocketCommunicator. The SocketCommunicator is bound to a User object and then a ConnectEvent is generated.
Overrides:
run in class java.lang.Thread


docs generated on Thu Jan 24 08:57:26 CST 2002