server.callbacks
Class Notifier

java.lang.Object
  extended by java.lang.Thread
      extended by server.callbacks.Notifier
All Implemented Interfaces:
java.lang.Runnable

public class Notifier
extends java.lang.Thread


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
Notifier(int id, int pri, AsyncCallback list)
           
 
Method Summary
 long getElapsedCallbackTime()
          Gets the time since the last callback was started based on the current system time.
 long getElapsedCallbackTime(long curr)
          Sets the time since the last callback was started based on the system time passed into the method.
 boolean isCallbackActive()
          Gets whether this notifier is currently executing a callback.
 void resetCallbackTime()
          Resets the elapsed callback time to 0.
 void run()
           
 void setRequest(CallbackRequest c)
          Called by CallbackList.waitForCallback() to set the next callback request to execute.
 void timeToStop()
          Sets the stop flag which will cause the run() method to terminate after completing current activity
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Notifier

public Notifier(int id,
                int pri,
                AsyncCallback list)
Method Detail

run

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

setRequest

public void setRequest(CallbackRequest c)
Called by CallbackList.waitForCallback() to set the next callback request to execute.


timeToStop

public void timeToStop()
Sets the stop flag which will cause the run() method to terminate after completing current activity


getElapsedCallbackTime

public long getElapsedCallbackTime()
Gets the time since the last callback was started based on the current system time. This value is meaningful only if isCallbackActive() returns true


getElapsedCallbackTime

public long getElapsedCallbackTime(long curr)
Sets the time since the last callback was started based on the system time passed into the method. This value is meaningful only if isCallbackActive() returns true


isCallbackActive

public boolean isCallbackActive()
Gets whether this notifier is currently executing a callback.


resetCallbackTime

public void resetCallbackTime()
Resets the elapsed callback time to 0. This method should be called by a Callback object before each method dispatch.