org.erights.e.elib.serial
Class RemoteCall

java.lang.Object
  |
  +--org.erights.e.elib.ref.Ref
        |
        +--org.erights.e.elib.ref.StemCell
              |
              +--org.erights.e.elib.serial.RemoteCall
All Implemented Interfaces:
Amplifiable, Callable, Marker, ObjectInputValidation, PassByConstruction, Persistent, Serializable

public class RemoteCall
extends StemCell

Safe: A RemoteCall unserializes into the result of


     recipient.verb(args...)
 
allowing arbitrary execution *during* deserialization, but only within capability constraints. All pointers serialized as pointers to the RemoteCall will be deserialized as pointing to the result of the call, or, if the unserializtion of the RemoteCall is in progress, to a promise for this result. This may violate static types or other constraints, and cause deserialization to fail.

If the call throws a problem, then the resolution is a reference broken by that problem.

Author:
Mark S. Miller
See Also:
Serialized Form

Field Summary
private  Object[] myArgs
           
private  Object myRecipient
           
private  String myVerb
           
private static long serialVersionUID
           
 
Fields inherited from class org.erights.e.elib.ref.StemCell
myOptResolver
 
Fields inherited from class org.erights.e.elib.ref.Ref
BROKEN, EVENTUAL, NEAR
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
RemoteCall(Object recipient, String verb, Object[] args)
          Enabled: Descibe an invocation to be run on the other side of a serialization barrier of some sort.
 
Method Summary
 void __printOn(TextWriter out)
          Suppressed:
static Object[] optUncall(Object candidate)
          Enabled: If candidate is a RemoteCall, return the uncall triple it represents.
private  Object readResolve()
          Invoked directly by the ObjectInputStream following desrialization of the entire RemoteCall to get the object to use instead.
 
Methods inherited from class org.erights.e.elib.ref.StemCell
callAll, isResolved, optProblem, sendAll, sendAllOnly, state, validateObject
 
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

serialVersionUID

private static final long serialVersionUID

myRecipient

private final Object myRecipient

myVerb

private final String myVerb

myArgs

private final Object[] myArgs
Constructor Detail

RemoteCall

public RemoteCall(Object recipient,
                  String verb,
                  Object[] args)
Enabled: Descibe an invocation to be run on the other side of a serialization barrier of some sort.

Parameters:
recipient - receives the message
verb - the message name (selector, method name)
args - the message arguments
Method Detail

readResolve

private Object readResolve()
                    throws ObjectStreamException
Invoked directly by the ObjectInputStream following desrialization of the entire RemoteCall to get the object to use instead.

ObjectStreamException

optUncall

public static Object[] optUncall(Object candidate)
Enabled: If candidate is a RemoteCall, return the uncall triple it represents.

Otherwise, return null.


__printOn

public void __printOn(TextWriter out)
               throws IOException
Suppressed:

IOException


comments?