org.deduced.utilities
Class OnDemandRunner

java.lang.Object
  extended by org.deduced.utilities.AbstractRunner
      extended by org.deduced.utilities.OnDemandRunner
All Implemented Interfaces:
Runner

public class OnDemandRunner
extends AbstractRunner

OnDemandRunner will execute runnable objects when the programmer allows it to.

Author:
Steve McDuff

Field Summary
private  java.util.List<java.lang.Runnable> runnableList
          the last runnable that was asked to be run
 
Constructor Summary
OnDemandRunner()
           
 
Method Summary
 java.util.List<java.lang.Runnable> getRunnableList()
          getRunnableList
 void run(java.lang.Runnable newRunnable)
          (non-Javadoc)
 void runNow()
          runNow will run all the runnable immediately in a blocking way.
 void runNowSilent()
          runNowSilent will run the last runnable immediately in a blocking way and hide any exception that occurs while running.
 
Methods inherited from class org.deduced.utilities.AbstractRunner
runSilent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runnableList

private java.util.List<java.lang.Runnable> runnableList
the last runnable that was asked to be run

Constructor Detail

OnDemandRunner

public OnDemandRunner()
Method Detail

getRunnableList

public java.util.List<java.lang.Runnable> getRunnableList()
getRunnableList

Returns:
the list of pending runnable objects

runNow

public void runNow()
runNow will run all the runnable immediately in a blocking way. Any exception encountered will be thrown and it will stop the execution of pending runners.


runNowSilent

public void runNowSilent()
runNowSilent will run the last runnable immediately in a blocking way and hide any exception that occurs while running.


run

public void run(java.lang.Runnable newRunnable)
(non-Javadoc)

Parameters:
newRunnable - the runnable item to invoke
See Also:
Runner.run(java.lang.Runnable)