edu.dmi
Class Invoker

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.dmi.Invoker

public class Invoker
extends java.lang.Thread

Hasan Timucin Ozdemir


Field Summary
private  boolean fIsProcessActive
           
private  GenericMessageBroadcaster fList
           
private  long fStartedProcess
           
private  boolean fStopNow
           
private  GenericMessage message
           
private  boolean messageArrived
           
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
(package private) Invoker(int id, int pri, GenericMessageBroadcaster list)
           
 
Method Summary
(package private)  void checkForTimeout(long curr, long max)
           
 long getElapsedProcessTime()
          Gets the time since the last callback was started based on the current system time.
 long getElapsedProcessTime(long curr)
          Sets the time since the last process was started based on the system time passed into the method.
 boolean isProcessActive()
          Gets whether this invoker is currently executing a callback.
 void resetProcessTime()
          Resets the elapsed process time to 0.
 void run()
           
 void setGenericMessage(GenericMessage c)
           
 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, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fStopNow

private boolean fStopNow

fStartedProcess

private long fStartedProcess

fList

private GenericMessageBroadcaster fList

message

private GenericMessage message

fIsProcessActive

private boolean fIsProcessActive

messageArrived

private boolean messageArrived
Constructor Detail

Invoker

Invoker(int id,
        int pri,
        GenericMessageBroadcaster list)
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

setGenericMessage

public void setGenericMessage(GenericMessage c)

timeToStop

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

getElapsedProcessTime

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

getElapsedProcessTime

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

isProcessActive

public boolean isProcessActive()
Gets whether this invoker is currently executing a callback.

resetProcessTime

public void resetProcessTime()
Resets the elapsed process time to 0.

checkForTimeout

final void checkForTimeout(long curr,
                           long max)