org.sapia.ubik.rmi.server.transport
Class MarshalledObject

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.MarshalledObject
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class MarshalledObject
extends java.lang.Object
implements java.io.Externalizable

An instance of this class keeps an object in byte form.

Author:
Yanick Duchesne 17-Sep-2003
See Also:
Serialized Form

Constructor Summary
MarshalledObject()
          Do not use.
MarshalledObject(java.lang.Object o, VmId id, java.lang.String transportType, java.lang.String codebase)
          Constructor for MarshalledObject.
 
Method Summary
 java.lang.Object get(java.lang.ClassLoader loader)
          Returns the object that this instance wraps.
 void readExternal(java.io.ObjectInput in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledObject

public MarshalledObject()
Do not use. Meant for externalization.


MarshalledObject

public MarshalledObject(java.lang.Object o,
                        VmId id,
                        java.lang.String transportType,
                        java.lang.String codebase)
                 throws java.io.IOException
Constructor for MarshalledObject.

Throws:
java.io.IOException
Method Detail

get

public java.lang.Object get(java.lang.ClassLoader loader)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
Returns the object that this instance wraps. Internally uses the given classloader to deserialize the wrapped object (kept as an array of bytes).

Parameters:
loader - the ClassLoader to use for deserialization.
Returns:
an Object
Throws:
java.io.IOException - if an error occurs while deserializing.
java.lang.ClassNotFoundException - if the class of the object to deserialize was not found.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
See Also:
Externalizable.writeExternal(ObjectOutput)


Copyright © 2010 Sapia OSS. All Rights Reserved.