rabbit.util
Class RestartableThread

java.lang.Object
  extended byjava.lang.Thread
      extended byrabbit.util.RestartableThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
Connection

public abstract class RestartableThread
extends java.lang.Thread

A thread class that is restartable.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RestartableThread()
           
RestartableThread(java.lang.String name)
           
 
Method Summary
abstract  void doWork()
          This is the method that is run.
 void run()
          Dont override this in subclasses.
 void start()
          Overridden to handle restarting of this thread.
 
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, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestartableThread

public RestartableThread()

RestartableThread

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

doWork

public abstract void doWork()
This is the method that is run. To change a thread to a restartablethread move the old run to doWork.


run

public void run()
Dont override this in subclasses.


start

public void start()
Overridden to handle restarting of this thread.