Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.rmi.MarshalledObject

java.lang.Object
    |
    +----java.rmi.MarshalledObject

public final class MarshalledObject
extends Object
implements Serializable
A MarshalledObject contains a byte stream with the serialized representation of an object given to its constructor. The get method returns a new copy of the original object, as deserialized from the contained byte stream. The contained object is serialized and deserialized with the same serialization semantics used for marshaling and unmarshaling parameters and return values of RMI calls: When the serialized form is created, classes are annotated with a codebase URL from where the class can be loaded (if available), and when copies of the object are retrieved, if the bytecodes for a class is not available locally, they will be loaded from the annotated URL. Also, Remote objects are replaced with their proxy stubs during serialization. MarshalledObject facilitates passing objects in RMI calls that are not automatically deserialized immediately by the remote peer.


Constructor Summary
 MarshalledObject(Object obj)
Create a new MarshalledObject that contains the serialized representation of the current state of the supplied object.
 

Method Summary
boolean  equals(Object obj)
Compare this MarshalledObject to another object.
Object  get()
Return a new copy of the contained object.
int  hashCode()
Return a hash code for this MarshalledObject.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledObject

public MarshalledObject(Object obj) throws IOException
Create a new MarshalledObject that contains the serialized representation of the current state of the supplied object. The object is serialized with the semantics used for marshaling parameters for RMI calls.
Parameters:
obj - the object to be serialized (must be serializable)
Method Detail

get

public Object get() throws IOException, ClassNotFoundException
Return a new copy of the contained object. The internal representation is deserialized with the semantics used for unmarshaling paramters for RMI calls.
Returns:
a copy of the contained object

hashCode

public int hashCode()
Return a hash code for this MarshalledObject.
Returns:
a hash code
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Compare this MarshalledObject to another object. Return true if and only if the argument refers to a MarshalledObject that contains exactly the same serialized representation of an object as this one does.
Parameters:
obj - the object to compare this MarshalledObject against
Returns:
true if the argument contains an equaivalent serialized object
Overrides:
equals in class Object

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.