com.planet_ink.coffee_mud.core.threads
Class ServiceEngine

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.threads.ServiceEngine
All Implemented Interfaces:
CMObject, CMLibrary, ThreadEngine, java.lang.Cloneable, java.lang.Comparable<CMObject>, java.lang.Runnable

public class ServiceEngine
extends java.lang.Object
implements ThreadEngine


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.ThreadEngine
ThreadEngine.SupportThread
 
Field Summary
static long STATUS_ALLMISCTICKS
           
protected  SLinkedList<Tick> ticks
           
 
Constructor Summary
ServiceEngine()
           
 
Method Summary
 boolean activate()
           
protected  void addTickGroup(Tick tock)
           
 void checkHealth()
           
 void clearDebri(Room room, int taskCode)
           
 int compareTo(CMObject o)
           
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 boolean deleteTick(Tickable E, int tickID)
           
protected  void delTickGroup(Tick tock)
           
 int getMaxObjectsPerThread()
           
 java.util.List<Tickable> getNamedTickingObjects(java.lang.String name)
           
 java.lang.String getServiceThreadSummary(java.lang.Thread T)
           
 ThreadEngine.SupportThread getSupportThread()
           
 java.lang.String getTickStatusSummary(Tickable obj)
           
 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.
 void insertOrderDeathInOrder(DVector DV, long lastStart, java.lang.String msg, Tick tock)
           
 boolean isAllSuspended()
           
 boolean isHere(Tickable E2, Room here)
           
 boolean isSuspended(Tickable E, int tickID)
           
 boolean isTicking(Tickable E, int tickID)
           
 CMObject newInstance()
          Returns a new instance of this class.
 void propertiesLoaded()
           
 void rejuv(Room here, int tickID)
           
 void resumeAll()
           
 void resumeTicking(Tickable E, int tickID)
           
 void run()
           
 boolean shutdown()
           
 void startTickDown(Tickable E, int tickID, int numTicks)
           
 void startTickDown(Tickable E, int tickID, long TICK_TIME, int numTicks)
           
 void suspendAll()
           
protected  boolean suspendResumeTicking(Tickable E, int tickID, boolean suspend)
           
 void suspendTicking(Tickable E, int tickID)
           
 java.lang.String systemReport(java.lang.String itemCode)
           
 void tickAllTickers(Room here)
           
 java.util.Iterator<Tick> tickGroups()
           
 java.lang.String tickInfo(java.lang.String which)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_ALLMISCTICKS

public static final long STATUS_ALLMISCTICKS
See Also:
Constant Field Values

ticks

protected SLinkedList<Tick> ticks
Constructor Detail

ServiceEngine

public ServiceEngine()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, MiscTech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

propertiesLoaded

public void propertiesLoaded()
Specified by:
propertiesLoaded in interface CMLibrary

getSupportThread

public ThreadEngine.SupportThread getSupportThread()
Specified by:
getSupportThread in interface CMLibrary

tickGroups

public java.util.Iterator<Tick> tickGroups()
Specified by:
tickGroups in interface ThreadEngine

getMaxObjectsPerThread

public int getMaxObjectsPerThread()

delTickGroup

protected void delTickGroup(Tick tock)

addTickGroup

protected void addTickGroup(Tick tock)

startTickDown

public void startTickDown(Tickable E,
                          int tickID,
                          int numTicks)
Specified by:
startTickDown in interface ThreadEngine

startTickDown

public void startTickDown(Tickable E,
                          int tickID,
                          long TICK_TIME,
                          int numTicks)
Specified by:
startTickDown in interface ThreadEngine

deleteTick

public boolean deleteTick(Tickable E,
                          int tickID)
Specified by:
deleteTick in interface ThreadEngine

isTicking

public boolean isTicking(Tickable E,
                         int tickID)
Specified by:
isTicking in interface ThreadEngine

isAllSuspended

public boolean isAllSuspended()
Specified by:
isAllSuspended in interface ThreadEngine

suspendAll

public void suspendAll()
Specified by:
suspendAll in interface ThreadEngine

resumeAll

public void resumeAll()
Specified by:
resumeAll in interface ThreadEngine

suspendTicking

public void suspendTicking(Tickable E,
                           int tickID)
Specified by:
suspendTicking in interface ThreadEngine

resumeTicking

public void resumeTicking(Tickable E,
                          int tickID)
Specified by:
resumeTicking in interface ThreadEngine

suspendResumeTicking

protected boolean suspendResumeTicking(Tickable E,
                                       int tickID,
                                       boolean suspend)

isSuspended

public boolean isSuspended(Tickable E,
                           int tickID)
Specified by:
isSuspended in interface ThreadEngine

isHere

public boolean isHere(Tickable E2,
                      Room here)

systemReport

public java.lang.String systemReport(java.lang.String itemCode)
Specified by:
systemReport in interface ThreadEngine

rejuv

public void rejuv(Room here,
                  int tickID)
Specified by:
rejuv in interface ThreadEngine

tickAllTickers

public void tickAllTickers(Room here)
Specified by:
tickAllTickers in interface ThreadEngine

tickInfo

public java.lang.String tickInfo(java.lang.String which)
Specified by:
tickInfo in interface ThreadEngine

shutdown

public boolean shutdown()
Specified by:
shutdown in interface CMLibrary

clearDebri

public void clearDebri(Room room,
                       int taskCode)
Specified by:
clearDebri in interface ThreadEngine

getNamedTickingObjects

public java.util.List<Tickable> getNamedTickingObjects(java.lang.String name)
Specified by:
getNamedTickingObjects in interface ThreadEngine

getTickStatusSummary

public java.lang.String getTickStatusSummary(Tickable obj)
Specified by:
getTickStatusSummary in interface ThreadEngine

getServiceThreadSummary

public java.lang.String getServiceThreadSummary(java.lang.Thread T)
Specified by:
getServiceThreadSummary in interface ThreadEngine

insertOrderDeathInOrder

public void insertOrderDeathInOrder(DVector DV,
                                    long lastStart,
                                    java.lang.String msg,
                                    Tick tock)

checkHealth

public void checkHealth()

run

public void run()
Specified by:
run in interface java.lang.Runnable

activate

public boolean activate()
Specified by:
activate in interface CMLibrary