net.captp.jcomm
Class CapTPReplacer

java.lang.Object
  |
  +--org.erights.e.elib.serial.Replacer
        |
        +--net.captp.jcomm.CapTPReplacer

class CapTPReplacer
extends Replacer

Used to specialize the SerializationStream for encoding a reference over a CapTP connection.

When our run method returns an ObjectRefDesc, the corresponding decoded object is not simply this ObjectRefDesc. It is this ObjectRefDesc as dereferenced by CapTPReviver.

Author:
Mark S. Miller

Field Summary
private  CapTPConnection myConn
          The connection over which we are communicating
 
Constructor Summary
(package private) CapTPReplacer(CapTPConnection conn)
           
 
Method Summary
 Object substitute(Object ref)
          Replace any proxiable object (an implementer of PassByProxy, a Far reference, a Promise, or a Broken reference) with an appropriate over-the-wire representation, or if it's not a proxiable object, make sure we're actually permitted to pass it by construction.
 
Methods inherited from class org.erights.e.elib.serial.Replacer
getSerializationStream, record, recordFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myConn

private final CapTPConnection myConn
The connection over which we are communicating

Constructor Detail

CapTPReplacer

CapTPReplacer(CapTPConnection conn)
Method Detail

substitute

public Object substitute(Object ref)
Replace any proxiable object (an implementer of PassByProxy, a Far reference, a Promise, or a Broken reference) with an appropriate over-the-wire representation, or if it's not a proxiable object, make sure we're actually permitted to pass it by construction.

Specified by:
substitute in class Replacer
Parameters:
ref - The object that needs to somehow get serialized.
Returns:
The object to actually serialize in its stead -- its representative.


comments?