org.erights.e.elib.vat
Class PendingRun

java.lang.Object
  |
  +--org.erights.e.elib.vat.SendingContext
        |
        +--org.erights.e.elib.vat.PendingEvent
              |
              +--org.erights.e.elib.vat.PendingRun
All Implemented Interfaces:
EPrintable, Runnable

class PendingRun
extends PendingEvent

Just wraps a Runnable to enqueue it for execution with debugging info turned on.

Author:
Mark S. Miller

Field Summary
private  Runnable myTodo
           
 
Fields inherited from class org.erights.e.elib.vat.SendingContext
 
Constructor Summary
(package private) PendingRun(Vat vat, Runnable todo)
           
 
Method Summary
 void __printOn(TextWriter out)
          Enabled:
protected  void innerRun()
          Just calls the Runnable's run() method without catching exceptions or anything.
 void printContextOn(TextWriter out)
          Enabled:
 void report(String msg, Throwable problem)
          Trace at warning level that this event caused this problem.
 void run()
          Do now the event that this PendingEvent represents.
 
Methods inherited from class org.erights.e.elib.vat.SendingContext
report, toString, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myTodo

private final Runnable myTodo
Constructor Detail

PendingRun

PendingRun(Vat vat,
           Runnable todo)
Method Detail

innerRun

protected void innerRun()
Just calls the Runnable's run() method without catching exceptions or anything.

Our own PendingEvent.run() wraps innerRun() with the needed try/catch and such.

Specified by:
innerRun in class PendingEvent

__printOn

public void __printOn(TextWriter out)
               throws IOException
Description copied from interface: EPrintable
Enabled:

IOException

run

public final void run()
Do now the event that this PendingEvent represents.

Does bookkeeping of debugging info around call to PendingEvent.innerRun(), including catching all thrown Exceptions that escape from innerRun() reporting them rather than propogating them.

Specified by:
run in interface Runnable
See Also:
java.lang.Thread#run()

report

public void report(String msg,
                   Throwable problem)
Trace at warning level that this event caused this problem.


printContextOn

public void printContextOn(TextWriter out)
                    throws IOException
Description copied from class: SendingContext
Enabled:

Overrides:
printContextOn in class SendingContext
IOException


comments?