com.planet_ink.coffee_mud.core.intermud.server
Class ServerThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.planet_ink.coffee_mud.core.intermud.server.ServerThread
All Implemented Interfaces:
java.lang.Runnable

public class ServerThread
extends java.lang.Thread

The Server class uses exactly one thread ServerThread object during the course of program execution. This thread loops until the Server class tells it to shut down. The loop is executed in the thread's run() method.

See Also:
Server

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
protected ServerThread(java.lang.String mname, int mport, ImudServices imud)
           
 
Method Summary
protected  ServerObject copyObject(java.lang.String str)
           
protected  ServerObject findObject(java.lang.String str)
           
protected  java.util.Date getBootTime()
           
protected  ServerUser[] getInteractives()
           
protected  java.lang.String getMudName()
           
protected  ServerObject[] getObjects()
           
protected  int getPort()
           
protected  void removeObject(ServerObject ob)
           
 void run()
          While the mud is running, this method repeats the following steps over and over: Check for pending user input and trigger user commands Check for pending object events and execute them Check for incoming user connections and create an interactive object for each.
 void shutdown()
           
 
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

ServerThread

protected ServerThread(java.lang.String mname,
                       int mport,
                       ImudServices imud)
Method Detail

copyObject

protected ServerObject copyObject(java.lang.String str)
                           throws ObjectLoadException
Throws:
ObjectLoadException

findObject

protected ServerObject findObject(java.lang.String str)
                           throws ObjectLoadException
Throws:
ObjectLoadException

removeObject

protected void removeObject(ServerObject ob)

run

public void run()
While the mud is running, this method repeats the following steps over and over:

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

getBootTime

protected java.util.Date getBootTime()

getInteractives

protected ServerUser[] getInteractives()

getMudName

protected java.lang.String getMudName()

getPort

protected int getPort()

shutdown

public void shutdown()

getObjects

protected ServerObject[] getObjects()