|
|||||||||||
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.UnconnectedRef
If an unresolved reference becomes Broken without first being Resolved, it becomes an UnconnectedRef (an Unsettled Broken reference).
A UnconnectedRef will never designate an object, but provides a Throwable explaining why not (the problem). An UnconnectedRef is not sameness-comparable to anything else, including itself. A UnconnectedRef is forever Broken by the same problem and without any sameness identity.
A UnconnectedRef's contents must be transitively transparently Selfless and passable by construction. UnconnectedRef is listed as implementing PassByConstruction for implementation reasons only. Not being NEAR, by definition it is not a PassByContruction object.
Field Summary | |
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) |
UnconnectedRef(Throwable problem)
Makes a Ref that will never designate an object because of problem. |
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 |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private final Throwable myProblem
Constructor Detail |
UnconnectedRef(Throwable problem)
Method Detail |
public Throwable optProblem()
All implementations of optProblem/0 must be thread safe, in
order for Ref.state/0
to be thread safe.
optProblem
in class Ref
Ref.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 Ref
public String state()
All implementations of state/0 must be thread safe, in order
for Ref.isNear/1
to be thread safe.
state
in class Ref
Ref.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 Callable
callAll
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 Ref
public boolean isResolved()
Ref
isResolved
in class Ref
void setTarget(Ref newTarget)
Ref
setTarget
in class Ref
void 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 |