us.ihmc.utilities.thread
Class DebugInterruptableWorker

java.lang.Object
  extended by us.ihmc.utilities.thread.InterruptableWorker
      extended by us.ihmc.utilities.thread.DebugInterruptableWorker
All Implemented Interfaces:
java.lang.Runnable

public class DebugInterruptableWorker
extends InterruptableWorker


Nested Class Summary
 
Nested classes/interfaces inherited from class us.ihmc.utilities.thread.InterruptableWorker
InterruptableWorker.STATE
 
Constructor Summary
DebugInterruptableWorker()
           
 
Method Summary
 InterruptableWorker.STATE doWork()
          This method needs to be overridden and should perform the actual work It should periodically chech the isInterrupted method to know if it should stop.
 java.lang.Object getCurrentResult()
          This method needs to be overridden and should be used by the application to get the current result while waiting as well as get the final result once finished
static void main(java.lang.String[] args)
           
 void reset(int startNumber, int endNumber, int countBy)
           
 
Methods inherited from class us.ihmc.utilities.thread.InterruptableWorker
getCurrentState, isInterrupted, isWorkingOrPendingInterruption, reset, run, setCurrentState, startWorkOnANewThread, startWorkOnThisThread, stopWork, waitForResult
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugInterruptableWorker

public DebugInterruptableWorker()
Method Detail

reset

public void reset(int startNumber,
                  int endNumber,
                  int countBy)

doWork

public InterruptableWorker.STATE doWork()
Description copied from class: InterruptableWorker
This method needs to be overridden and should perform the actual work It should periodically chech the isInterrupted method to know if it should stop. It should return one of the three acceptable finish states: SUCCESSFULLY_COMPLETED UNSUCCESSFULLY_COMPLETED INTERRUPTED

Specified by:
doWork in class InterruptableWorker
Returns:
STATE

getCurrentResult

public java.lang.Object getCurrentResult()
Description copied from class: InterruptableWorker
This method needs to be overridden and should be used by the application to get the current result while waiting as well as get the final result once finished

Specified by:
getCurrentResult in class InterruptableWorker
Returns:
Object

main

public static void main(java.lang.String[] args)