| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--org.erights.e.elib.ref.Ref
        |
        +--org.erights.e.elib.ref.DisconnectedRef
What a FarRef becomes when it breaks -- a BROKEN Ref with identity.
Maintains the same()ness identity and sameness hash of the FarRef. A DisconnectedRef is listed as an HONORARY Selfless object for implementation reasons only: (HONORARY because it encapsulates its identity, so it isn't transparent).
A DisconnectedRef's contents must be transitively transparently Selfless and passable by construction. DisconnectedRef is listed as implementing PassByConstruction for implementation reasons only. Not being NEAR, by definition it is not a PassByContruction object.
| Field Summary | |
| (package private)  Object | myIdentity | 
| private  Throwable | myProblem | 
| private static long | serialVersionUID | 
| Fields inherited from class org.erights.e.elib.ref.Ref | 
| BROKEN, EVENTUAL, NEAR, TheViciousRef | 
| Fields inherited from interface org.erights.e.elib.serial.Persistent | 
| HONORARY, HONORED_NAMES | 
| Fields inherited from interface org.erights.e.elib.serial.PassByConstruction | 
| HONORARY, HONORED_NAMES | 
| Constructor Summary | |
| (package private) | DisconnectedRef(Throwable problem,
                Object identity)Makes a Ref that will never deliver messages to any object because of problem, but which is considered the same() as a particular object. | 
| Method Summary | |
|  Object | callAll(String verb,
        Object[] args)This default implementation switches on state() and either synchronously forward the message, if we're NEAR, or complains. | 
| (package private)  void | commit()Used by a resolvers to turn off switchability, and thereby make this Ref equivalent to its current target. | 
| private  Throwable | doBreakage(String verb,
           Object[] args)Should be called only if the state is already BROKEN. | 
|  boolean | equals(Object other)As an HONORARY Selfless object, my .equals() and .hashCode() determine sameness. | 
|  int | hashCode()As an HONORARY Selfless object, my .equals() and .hashCode() determine sameness. | 
|  boolean | isResolved()Suppressed: | 
|  Throwable | optProblem()Returns this broken ref's problem. | 
| (package private)  Ref | resolutionRef()Returns this. | 
|  Ref | sendAll(String verb,
        Object[] args)Suppressed: Use E.sendAll(obj, verb, args) rather than obj.sendAll(verb, args). | 
|  Throwable | sendAllOnly(String verb,
            Object[] args)Suppressed: Use E.sendAllOnly(obj, verb, args) rather than obj.sendAllOnly(verb, args). | 
| (package private)  void | setTarget(Ref newTarget)Used by a resolvers to change the target. | 
|  String | state()Returns BROKEN. | 
| Methods inherited from class org.erights.e.elib.ref.Ref | 
| broken, disconnected, getAllegedType, getOptProxyHandler, GetRefMaker, ignore, isBroken, isDeepFrozen, isDeepPassByCopy, isEventual, isFar, isNear, isPassByProxy, isPBC, isPersistent, isResolved, isSameEver, isSelfish, isSelfless, isSettled, makeBufferingPromise, makeSwitchablePromise, optBroken, optProblem, optSealedDispatch, optSealedDispatch, optShorten, promise, resolution, resolution, respondsTo, sendMsg, state, toCallable, toRef, toString, whenBroken, whenBrokenOnly, whenResolved, whenResolvedOnly | 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
private static final long serialVersionUID
private final Throwable myProblem
final Object myIdentity
| Constructor Detail | 
DisconnectedRef(Throwable problem,
                Object identity)
Iff two [Broken]FarRefs have the same() identity, then they are considered the same().
identity must itself be an honorary Selfless object.
| Method Detail | 
public boolean equals(Object other)
NOTE: Uses myIdentity's .equals(), which is safe, as myIdentity must be an honorary Selfless object.
equals in class Objectother - the reference object with which to compare.
true if this object is the same as the obj
          argument; false otherwise.Object.hashCode(), 
java.util.Hashtablepublic int hashCode()
hashCode in class Objectjava.lang.Object#equals(java.lang.Object), 
java.util.Hashtablepublic Throwable optProblem()
 All implementations of optProblem/0 must be thread safe, in
 order for Ref.state/0 to be thread safe.
optProblem in class RefRef.optProblem(Object)Ref resolutionRef()
 All implementations of resolutionRef/0 must be thread safe, in
 order for Ref.resolution/0 to be thread
 safe.
resolutionRef in class Refpublic String state()
 All implementations of state/0 must be thread safe, in order
 for Ref.isNear/1 to be thread safe.
state in class RefRef.state(Object)
private Throwable doBreakage(String verb,
                             Object[] args)
Takes care of __whenMoreResolved(reactor) and __whenBroken(reactor). If you know verb/args aren't one of these, you don't need to call doBreakage().
public Object callAll(String verb,
                      Object[] args)
callAll in interface CallablecallAll in class Ref
public Ref sendAll(String verb,
                   Object[] args)
Ref
sendAll in class Ref
public Throwable sendAllOnly(String verb,
                             Object[] args)
Ref
sendAllOnly in class Refpublic boolean isResolved()
Ref
isResolved in class Refvoid setTarget(Ref newTarget)
Ref
setTarget in class Refvoid commit()
Ref
 If the current target is already equivalent to this Ref, then this Ref
 becomes broken by a ViciousCycleException.
commit in class Ref| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
