Class WorkerThread

java.lang.Object
  extended byjava.lang.Thread
      extended byWorkerThread
All Implemented Interfaces:
DonkeyTalker.Listener, java.lang.Runnable

public class WorkerThread
extends java.lang.Thread
implements DonkeyTalker.Listener


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread()
           
 
Method Summary
protected  void dies()
           
protected  void doTask(java.lang.String task, java.lang.Object param)
           
 boolean isRunning()
           
 boolean isStopping()
           
static boolean prepareForExit()
           
protected  int refreshInterval()
           
 void run()
           
 void stopListening()
           
 void stopRunning()
           
 void stopRunningImmediately()
           
 void wakeUp()
           
protected  boolean work()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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
 

Constructor Detail

WorkerThread

public WorkerThread()
Method Detail

wakeUp

public void wakeUp()

doTask

protected void doTask(java.lang.String task,
                      java.lang.Object param)

prepareForExit

public static boolean prepareForExit()

isRunning

public boolean isRunning()

isStopping

public boolean isStopping()

stopRunning

public void stopRunning()

stopRunningImmediately

public void stopRunningImmediately()

stopListening

public void stopListening()
Specified by:
stopListening in interface DonkeyTalker.Listener

work

protected boolean work()
                throws java.lang.Exception
Throws:
java.lang.Exception

dies

protected void dies()
             throws java.lang.Exception
Throws:
java.lang.Exception

refreshInterval

protected int refreshInterval()

run

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