nl.tudelft.simulation.language.concurrent
Class WorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by nl.tudelft.simulation.language.concurrent.WorkerThread
All Implemented Interfaces:
Runnable

public class WorkerThread
extends Thread

The WorkerThread is a working thread. The thread sleeps while not interrupted. If interuppted the jon.run operation is invoked.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.

See for project information www.simulation.tudelft.nl/language
License of use: Lesser General Public License (LGPL) , no warranty

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:55 $
Author:
Peter Jacobs , Alexander Verbraeck

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread(String name, Runnable job)
          constructs a new SimulatorRunThread
 
Method Summary
 void finalize()
           
 void run()
           
 
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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkerThread

public WorkerThread(String name,
                    Runnable job)
constructs a new SimulatorRunThread

Parameters:
name - the name of the thread
job - the job to run
Method Detail

finalize

public void finalize()
Overrides:
finalize in class Object
See Also:
Object.finalize()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.