com.irs.jam
Class PlanRuntimeThreadState

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.irs.jam.PlanRuntimeThreadState
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class PlanRuntimeThreadState
extends java.lang.Thread
implements java.io.Serializable

Represents the runtime state of a threaded sequence of constructs This class re-implements the PlanRuntimeState members simply because it's easier.

See Also:
Serialized Form

Field Summary
protected  Binding _binding
           
protected  Goal _goal
           
protected  PlanRuntimeSequenceState _substate
           
protected  PlanSequenceConstruct _thisConstruct
           
protected  int _threadNumber
           
protected  int[] _threadState
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PlanRuntimeThreadState(PlanSequenceConstruct be, Binding b, Goal thisGoal, int threadNumber, int[] threadState)
           
 
Method Summary
protected  void myResume()
          Resume the currently executing thread safely.
protected  void myStop()
          Stop the currently executing thread safely.
protected  void mySuspend()
          Suspend the currently executing thread safely.
 void run()
           
protected  boolean stepComplete()
          Returns true if this thread has executed the next action/construct and suspended itself.
protected  boolean stopped()
          Returns true if this thread has been stopped.
protected  boolean suspended()
          Returns true if this thread has been suspended.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Field Detail

_thisConstruct

protected PlanSequenceConstruct _thisConstruct

_substate

protected PlanRuntimeSequenceState _substate

_binding

protected Binding _binding

_goal

protected Goal _goal

_threadNumber

protected int _threadNumber

_threadState

protected int[] _threadState
Constructor Detail

PlanRuntimeThreadState

public PlanRuntimeThreadState(PlanSequenceConstruct be,
                              Binding b,
                              Goal thisGoal,
                              int threadNumber,
                              int[] threadState)
Method Detail

mySuspend

protected void mySuspend()
Suspend the currently executing thread safely.

suspended

protected boolean suspended()
Returns true if this thread has been suspended.
See Also:
mySuspend()

myResume

protected void myResume()
Resume the currently executing thread safely.

myStop

protected void myStop()
Stop the currently executing thread safely.

stopped

protected boolean stopped()
Returns true if this thread has been stopped.
See Also:
myStop()

stepComplete

protected boolean stepComplete()
Returns true if this thread has executed the next action/construct and suspended itself. If this thread is still in the middle of execution the main thread waits until it gets notified.
See Also:
suspended()

run

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