aicas logoJamaica 3.2 release 62

java.rmi
Class MarshalledObject

java.lang.Object
  extended by java.rmi.MarshalledObject
All Implemented Interfaces:
Serializable

public final class MarshalledObject
extends Object
implements Serializable

A MarshalledObject consists of a serialized object which is marshalled according to the RMI specification.

An object passed to the constructor is serialized and tagged with the needed URL to retrieve its class definition for remote usage. If the object is a remote reference its stub is serialized instead. The instance of this marshalled object can be later retrieved by its get() method.

See Also:
Serialized Form

Constructor Summary
MarshalledObject(Object obj)
          Constructs a MarshalledObject from the given object.
 
Method Summary
 boolean equals(Object obj)
          Checks if the given object is equal to this marshalled object.
 Object get()
          Constructs and returns a copy of the internal serialized object.
 int hashCode()
          hashCode returns a hash code for this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledObject

public MarshalledObject(Object obj)
                 throws IOException
Constructs a MarshalledObject from the given object.

Parameters:
obj - the object to marshal
Throws:
IOException - if an I/O error during serialization occurs.
Method Detail

equals

public boolean equals(Object obj)
Checks if the given object is equal to this marshalled object.

Marshalled objects are considered equal if they contain the same serialized object. Codebase annotations where the class definition can be downloaded are ignored in the equals test.

Overrides:
equals in class Object
Parameters:
obj - the object to compare.
Returns:
true if equal, false otherwise.

get

public Object get()
           throws IOException,
                  ClassNotFoundException
Constructs and returns a copy of the internal serialized object.

Returns:
The deserialized object.
Throws:
IOException - if an I/O exception occurs during deserialization.
ClassNotFoundException - if the class of the deserialized object cannot be found.

hashCode

public int hashCode()
Description copied from class: Object
hashCode returns a hash code for this object. The hash code must be equal for two objects a and b if a.equals(b) is true.

The default implementation returns System.identityHashCode(this).

Overrides:
hashCode in class Object
Returns:
a hash code value.

aicas logoJamaica 3.2 release 62

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2008 aicas GmbH. All Rights Reserved.