public class ServerThread extends java.lang.Object implements Tickable
idConverter
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Modifier | Constructor | Description |
---|---|---|
protected |
ServerThread(java.lang.String mname,
int mport,
ImudServices imud) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(CMObject o) |
|
protected ServerObject |
copyObject(java.lang.String str) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
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() |
|
int |
getTickStatus() |
A coded status for this object during the period where
its tick method is being called.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
java.lang.String |
name() |
The nice displayable name of this instance of this object
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
protected void |
removeObject(ServerObject ob) |
|
void |
shutdown() |
|
void |
start() |
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.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
protected ServerThread(java.lang.String mname, int mport, ImudServices imud)
public java.lang.String ID()
CMObject
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public CMObject copyOf()
CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public java.lang.String name()
Tickable
name
in interface CMObject
name
in interface Tickable
Environmental.Name()
public int getTickStatus()
Tickable
getTickStatus
in interface Tickable
Tickable.tick(Tickable, int)
protected ServerObject copyObject(java.lang.String str) throws ObjectLoadException
ObjectLoadException
protected ServerObject findObject(java.lang.String str) throws ObjectLoadException
ObjectLoadException
protected void removeObject(ServerObject ob)
public void start()
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
protected java.util.Date getBootTime()
protected ServerUser[] getInteractives()
protected java.lang.String getMudName()
protected int getPort()
public void shutdown()
protected ServerObject[] getObjects()