org.mbari.siam.foce.devices.controlLoop
Class WorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.mbari.siam.foce.devices.controlLoop.WorkerThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ConnectorWorker, ControlLoopWorker, Model, OSDTTestWorker, ProcessMonitor

public abstract class WorkerThread
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
protected  boolean _initialized
           
protected static org.apache.log4j.Logger _log4j
           
protected  java.lang.String _name
           
protected  boolean _pause
           
protected  boolean _running
           
protected  boolean _terminate
           
protected  long _updatePeriodMillisec
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread()
           
WorkerThread(long updatePeriodMillisec)
           
WorkerThread(java.lang.String name)
           
WorkerThread(java.lang.String name, long updatePeriodMillisec)
           
 
Method Summary
static void delay(long delayMillisec)
           
abstract  void doWorkerAction()
           
 void initialize()
           
 boolean isInitialized()
           
 boolean isRunning()
           
 java.lang.String name()
           
 void pause(boolean pauseValue)
           
 void run()
           
 void setUpdatePeriod(long periodMillisec)
           
 void setWorkerName(java.lang.String name)
           
 void shutdown()
           
 void terminate()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j

_terminate

protected boolean _terminate

_pause

protected boolean _pause

_running

protected boolean _running

_initialized

protected boolean _initialized

_updatePeriodMillisec

protected long _updatePeriodMillisec

_name

protected java.lang.String _name
Constructor Detail

WorkerThread

public WorkerThread()

WorkerThread

public WorkerThread(java.lang.String name,
                    long updatePeriodMillisec)

WorkerThread

public WorkerThread(long updatePeriodMillisec)

WorkerThread

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

doWorkerAction

public abstract void doWorkerAction()

run

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

setWorkerName

public void setWorkerName(java.lang.String name)

initialize

public void initialize()
                throws java.lang.Exception
Throws:
java.lang.Exception

shutdown

public void shutdown()

setUpdatePeriod

public void setUpdatePeriod(long periodMillisec)

terminate

public void terminate()

pause

public void pause(boolean pauseValue)

isRunning

public boolean isRunning()

isInitialized

public boolean isInitialized()

delay

public static void delay(long delayMillisec)

name

public java.lang.String name()


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.