A
MarshalledInstance
contains an object in serialized form. The contained object can be deserialized on demand when explicitly requested. This allows an object to be sent from one VM to another in a way that allows the receiver to control when and if the object is deserialized.
The contained object is specified at construction time and can either be provided in unserialized or serialized form. If provided in unserialized form it will be serialized during construction with the serialization semantics defined by MarshalOutputStream
. In particular, classes are annotated with a codebase URL from which the class can be loaded (if available).
If the MarshalledInstance
needs to deserialize the contained object then the contained object will be deserialized with the deserialization semantics defined by MarshalInputStream
. In particular, the codebase annotations associated with the contained object may be used to load classes referenced by the contained object.
MarshalledInstance
provides functionality similar to java.rmi.MarshalledObject
, but additionally provides for the verification of codebase integrity. Unlike java.rmi.MarshalledObject
, it does not perform remote object-to-stub replacement.
@author Sun Microsystems, Inc.
@since 2.0