Deserializing a network object

In Java, every class C defining the method readResolve marks the class C being special. When an object o of class C is found on an input stream, instead of returning the object o, the deserialization gives o.readResolve().

    class WireRep implements Serializable {
      ...
      Object readResolve() {
          return receiveNetObj(this); // the object manager
      }
    }
When a wire representation if read from an object stream, it is replaced by: (i) its concrete representation if it is found locally, or (ii) a unique stub if it is remote reference.


- 14 -