org.jboss.serial.io
Class MarshalledObjectForLocalCalls

java.lang.Object
  extended by org.jboss.serial.io.MarshalledObjectForLocalCalls
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

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

This is the equivalent for MarshalledObject on RMI, but this is optimized for local calls. Instead of converting every single field into Bytes, this will use a DataContainer.

Author:
Clebert Suconic
See Also:
Serialized Form

Constructor Summary
MarshalledObjectForLocalCalls()
           
MarshalledObjectForLocalCalls(java.lang.Object obj)
           
MarshalledObjectForLocalCalls(java.lang.Object obj, SafeCloningRepository safeToReuse)
           
 
Method Summary
 java.lang.Object get()
          The object has to be unserialized only when the first get is executed.
 void readExternal(java.io.ObjectInput in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledObjectForLocalCalls

public MarshalledObjectForLocalCalls()

MarshalledObjectForLocalCalls

public MarshalledObjectForLocalCalls(java.lang.Object obj)
                              throws java.io.IOException
Throws:
java.io.IOException

MarshalledObjectForLocalCalls

public MarshalledObjectForLocalCalls(java.lang.Object obj,
                                     SafeCloningRepository safeToReuse)
                              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

get

public java.lang.Object get()
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
The object has to be unserialized only when the first get is executed.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

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

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


JBoss Serialization, a new approach to java-serialization.