org.erights.e.elib.vat
Class SendingContext

java.lang.Object
  |
  +--org.erights.e.elib.vat.SendingContext
All Implemented Interfaces:
EPrintable
Direct Known Subclasses:
Message, PendingEvent

public abstract class SendingContext
extends Object
implements EPrintable

Untamed: Records the context it was created in, so that it can be included in a later report.

Author:
Mark S. Miller

Field Summary
private  ConstList myOptSendingEStack
          A list of EStackItems to be stringified
private  Throwable myOptSendingJStack
          Optionally capture the stack of the sending event.
private  Vat myOptSendingVat
          The Vat of the event that asked for this to be queued, or null if the request came from outside any vats.
private  long mySendingTicket
          The ticket number within myOptSendingVat of the event that asked for this to be queued, or -1 if the request came from outside any vats.
 
Constructor Summary
SendingContext()
          Enabled: Captures the current context as the sending context.
SendingContext(SendingContext other)
          Enabled: XXX Kludge: Because SendingContext is used by subclassing rather than composition, we provide this constructor to copy the context part of two such objects.
 
Method Summary
 void printContextOn(TextWriter out)
          Enabled:
 void report(String msg)
          Enabled: Trace at warning level the context captured by this object on creation.
 String toString()
          Suppressed:
protected  void trace()
          This should always be called once construction is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.erights.e.elib.oldeio.EPrintable
__printOn
 

Field Detail

myOptSendingVat

private final Vat myOptSendingVat
The Vat of the event that asked for this to be queued, or null if the request came from outside any vats.


mySendingTicket

private final long mySendingTicket
The ticket number within myOptSendingVat of the event that asked for this to be queued, or -1 if the request came from outside any vats.


myOptSendingJStack

private final Throwable myOptSendingJStack
Optionally capture the stack of the sending event.

This is captured if causality is traced at the debug level or higher, and so is not captured by default. If causality is indeed traced at the debug level or higher, then this is captured whether or not the request happens in a vat.


myOptSendingEStack

private final ConstList myOptSendingEStack
A list of EStackItems to be stringified

Constructor Detail

SendingContext

public SendingContext(SendingContext other)
Enabled: XXX Kludge: Because SendingContext is used by subclassing rather than composition, we provide this constructor to copy the context part of two such objects.


SendingContext

public SendingContext()
Enabled: Captures the current context as the sending context.

Method Detail

trace

protected void trace()
This should always be called once construction is complete.


report

public void report(String msg)
Enabled: Trace at warning level the context captured by this object on creation.


printContextOn

public void printContextOn(TextWriter out)
                    throws IOException
Enabled:

IOException

toString

public String toString()
Suppressed:

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?