rl.server
Class Server

java.lang.Object
  extended by java.lang.Thread
      extended by rl.server.Server
All Implemented Interfaces:
java.lang.Runnable, CommandProcessorListener, GameServerListener, ParticipantRegistrationFactoryListener

public class Server
extends java.lang.Thread
implements CommandProcessorListener, ParticipantRegistrationFactoryListener, GameServerListener

Main Server class. When instantiated with main this fires up the main run loop.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Server()
           
 
Method Summary
 void disconnected(Connection c)
           
static void main(java.lang.String[] args)
           
 void ParticipantAdded(Participant p)
           
 void ParticipantRemoved(Participant p)
           
 void registerHandler(int command, CommandHandler ch)
           
 void run()
          Listen for incoming clients.
 void serverStatusChanged()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

public Server()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

run

public void run()
Listen for incoming clients.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

disconnected

public void disconnected(Connection c)
Specified by:
disconnected in interface CommandProcessorListener

ParticipantAdded

public void ParticipantAdded(Participant p)
Specified by:
ParticipantAdded in interface ParticipantRegistrationFactoryListener

ParticipantRemoved

public void ParticipantRemoved(Participant p)
Specified by:
ParticipantRemoved in interface ParticipantRegistrationFactoryListener

serverStatusChanged

public void serverStatusChanged()
Specified by:
serverStatusChanged in interface GameServerListener

registerHandler

public void registerHandler(int command,
                            CommandHandler ch)