|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.serial.Reviver | +--org.erights.e.elib.serial.Unserializer
Safe: Used to specialize the UnserializationStream for reviving from state
serialized using a corresponding Serializer
, where this reviving
uses no magic authority.
Therefore, we declare the class Unserializer to be safe.
Unserializer is specializable from E by providing a reviveFunc so that, on reincarnating for example, a restored object may be revives as a different object to be checkpointed as its representative.
Field Summary | |
private OneArgFunc |
myReviveFunc
|
static Unserializer |
THE_ONE
Enabled: The canonical instance |
Constructor Summary | |
Unserializer(OneArgFunc reviveFunc)
Enabled: |
Method Summary | |
Object |
substitute(Object ref)
Enabled: Currently, just returns reviveFunc(ref). |
Methods inherited from class org.erights.e.elib.serial.Reviver |
getUnserializationStream, play, playFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Unserializer THE_ONE
private final OneArgFunc myReviveFunc
Constructor Detail |
public Unserializer(OneArgFunc reviveFunc)
reviveFunc
- Method Detail |
public Object substitute(Object ref)
XXX Bug: Must make sure that classes are safe and that (therefore?) instances are instances of classes that grant no authority by virtue of creation.
substitute
in class Reviver
ref
- The object that was reconstructed from the serialization
stream.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |