org.erights.e.elib.serial
Class PersistentAuditor

java.lang.Object
  |
  +--org.erights.e.elib.slot.BaseGuard
        |
        +--org.erights.e.elib.slot.BaseAuditor
              |
              +--org.erights.e.elib.serial.PersistentAuditor
All Implemented Interfaces:
Auditor, Guard, SlotGuard, ValueGuard

public class PersistentAuditor
extends BaseAuditor

Safe: The guard (and auditor) known as "Persistent" and the auditor (and guard) known as "PersistentAuditor".

PersistentAuditor.THE_ONE is the auditor (and guard) known as PersistentAuditor and placed in the universalScope, since it represents no authority. It is the result of calling the PersistentAuditor constructor with an empty map as a scalpel. (XXX Even this map should include bindings for the objects in the universalScope. Actually, Ref.isPersistent() should know about those objects, in order to report that they are persistent.)

The guard (and auditor) known as Persistent is in the privileged scope and knows about the scalpel from that same privileged scope. It reports that any scalpel-key is persistent. Since this is a mutable set, this object conveys the authority to sense mutations to that set.

Author:
Mark S. Miller

Field Summary
private  Thunk myOptGetSutureFunc
           
private  EMap myOptScalpel
           
static PersistentAuditor THE_ONE
          Enabled:
 
Fields inherited from class org.erights.e.elib.slot.BaseGuard
myOptValueGuard
 
Constructor Summary
private PersistentAuditor()
           
  PersistentAuditor(Thunk getSutureFunc)
          Enabled:
 
Method Summary
 Object coerce(Object specimen, OneArgFunc optEjector)
          Enabled: Coerces specimen to be Persistent.
 String getName()
          Enabled:
 
Methods inherited from class org.erights.e.elib.slot.BaseAuditor
audit
 
Methods inherited from class org.erights.e.elib.slot.BaseGuard
__printOn, accepts, and, butNot, coerce, get, makeSlot, makeSlot, not, or, toString, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THE_ONE

public static final PersistentAuditor THE_ONE
Enabled:


myOptGetSutureFunc

private Thunk myOptGetSutureFunc

myOptScalpel

private EMap myOptScalpel
Constructor Detail

PersistentAuditor

private PersistentAuditor()

PersistentAuditor

public PersistentAuditor(Thunk getSutureFunc)
Enabled:

Parameters:
getSutureFunc -
Method Detail

getName

public String getName()
Enabled:

Specified by:
getName in interface SlotGuard
Overrides:
getName in class BaseGuard

coerce

public Object coerce(Object specimen,
                     OneArgFunc optEjector)
Enabled: Coerces specimen to be Persistent.

If the specimen can't be coerced, exit according to optEjector.

Specified by:
coerce in interface ValueGuard
Overrides:
coerce in class BaseAuditor


comments?