DRCL JavaSim API

drcl.comp
Class WorkerThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--drcl.comp.WorkerThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
AWorkerThread, SEThread

public abstract class WorkerThread
extends java.lang.Thread

Carries out data processing at a component or special runtime tasks.

See Also:
ACARuntime

Field Summary
 Task currentContext
           
 Task mainContext
           
protected  Port returnPort
           
 ACARuntime runtime
          The worker runtime of this thread.
protected  java.lang.String state
           
static java.lang.String State_ACTIVE
          State of executing a task.
static java.lang.String State_FINISHING
          State of finishing up, ready to accept next task.
static java.lang.String State_INACTIVE
          State of not executing a task.
static java.lang.String State_SLEEPING
          State of sleeping for finite time.
static java.lang.String State_WAITING
          State of waiting on an object.
 long totalNumEvents
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread()
           
WorkerThread(java.lang.String name_)
           
WorkerThread(java.lang.ThreadGroup group_, java.lang.String name_)
           
 
Method Summary
 java.lang.String _debug()
           
 java.lang.String _getName()
           
protected  void finishing()
          Data processing has come to an end.
 long getNumEvents()
           
 java.lang.String getState()
           
 double getTime()
           
 java.lang.String info()
           
abstract  java.lang.String info(java.lang.String prefix_)
           
 boolean isOrphan()
           
 boolean isWaiting()
           
protected abstract  void lock(Component host_, java.lang.Object o_)
           
protected  void normalProcess()
           
protected abstract  void notify(Component host_, java.lang.Object o_)
           
protected abstract  void notifyAll(Component host_, java.lang.Object o_)
           
protected abstract  void releaseAllLocks(Component host_)
           
protected  void resumeComponent(Component c_)
           
protected  void setState(java.lang.String new_)
           
protected abstract  void sleepFor(double time_)
           
protected abstract  void sleepUntil(double time_)
           
protected  void startComponent(Component c_)
           
protected  void stopComponent(Component c_)
           
 java.lang.String toString()
           
protected  void unlock(Component host_, java.lang.Object o_)
           
protected abstract  void unlock(Component host_, java.lang.Object o_, boolean release_)
           
protected abstract  void wait(Component host_, java.lang.Object o_)
           
 
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, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

runtime

public ACARuntime runtime
The worker runtime of this thread.

mainContext

public Task mainContext

currentContext

public Task currentContext

state

protected java.lang.String state

totalNumEvents

public long totalNumEvents

returnPort

protected Port returnPort

State_INACTIVE

public static final java.lang.String State_INACTIVE
State of not executing a task.

State_ACTIVE

public static final java.lang.String State_ACTIVE
State of executing a task.

State_SLEEPING

public static final java.lang.String State_SLEEPING
State of sleeping for finite time.

State_WAITING

public static final java.lang.String State_WAITING
State of waiting on an object.

State_FINISHING

public static final java.lang.String State_FINISHING
State of finishing up, ready to accept next task.
Constructor Detail

WorkerThread

public WorkerThread()

WorkerThread

public WorkerThread(java.lang.ThreadGroup group_,
                    java.lang.String name_)

WorkerThread

public WorkerThread(java.lang.String name_)
Method Detail

info

public java.lang.String info()

info

public abstract java.lang.String info(java.lang.String prefix_)

_getName

public java.lang.String _getName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Thread

_debug

public java.lang.String _debug()

startComponent

protected void startComponent(Component c_)

stopComponent

protected void stopComponent(Component c_)

resumeComponent

protected void resumeComponent(Component c_)

normalProcess

protected void normalProcess()

getTime

public double getTime()

sleepFor

protected abstract void sleepFor(double time_)

sleepUntil

protected abstract void sleepUntil(double time_)

isOrphan

public final boolean isOrphan()

finishing

protected void finishing()
Data processing has come to an end.

getNumEvents

public long getNumEvents()

releaseAllLocks

protected abstract void releaseAllLocks(Component host_)

lock

protected abstract void lock(Component host_,
                             java.lang.Object o_)

unlock

protected void unlock(Component host_,
                      java.lang.Object o_)

unlock

protected abstract void unlock(Component host_,
                               java.lang.Object o_,
                               boolean release_)

wait

protected abstract void wait(Component host_,
                             java.lang.Object o_)

notify

protected abstract void notify(Component host_,
                               java.lang.Object o_)

notifyAll

protected abstract void notifyAll(Component host_,
                                  java.lang.Object o_)

getState

public final java.lang.String getState()

setState

protected void setState(java.lang.String new_)

isWaiting

public final boolean isWaiting()

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~