org.jboss.serial.persister
Class RegularObjectPersister

java.lang.Object
  extended byorg.jboss.serial.persister.RegularObjectPersister
All Implemented Interfaces:
Persister

public class RegularObjectPersister
extends java.lang.Object
implements Persister

This is the persister of a regular object.

Author:
clebert suconic

Constructor Summary
RegularObjectPersister()
           
 
Method Summary
static java.lang.Object defaultRead(java.io.ObjectInput input, java.lang.Object obj, ClassMetaData metaData, ObjectSubstitutionInterface substitution)
           
static void defaultWrite(java.io.ObjectOutput output, java.lang.Object obj, ClassMetaData metaClass, ObjectSubstitutionInterface substitution)
           
 byte getId()
          You need to always return what was sent by setId.
 java.lang.Object readData(java.lang.ClassLoader loader, ObjectDescription descriptor, java.io.ObjectInput input, ObjectSubstitutionInterface substitution)
           
 void setId(byte id)
           
 void writeData(ObjectDescription descriptor, java.io.ObjectOutput output, java.lang.Object obj, ObjectSubstitutionInterface substitution)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegularObjectPersister

public RegularObjectPersister()
Method Detail

getId

public byte getId()
Description copied from interface: Persister
You need to always return what was sent by setId. This is to enable Streaming to discover what Persister to use

Specified by:
getId in interface Persister

setId

public void setId(byte id)
Specified by:
setId in interface Persister

writeData

public void writeData(ObjectDescription descriptor,
                      java.io.ObjectOutput output,
                      java.lang.Object obj,
                      ObjectSubstitutionInterface substitution)
               throws java.io.IOException
Specified by:
writeData in interface Persister
Throws:
java.io.IOException

defaultWrite

public static void defaultWrite(java.io.ObjectOutput output,
                                java.lang.Object obj,
                                ClassMetaData metaClass,
                                ObjectSubstitutionInterface substitution)
                         throws java.io.IOException
Throws:
java.io.IOException

readData

public java.lang.Object readData(java.lang.ClassLoader loader,
                                 ObjectDescription descriptor,
                                 java.io.ObjectInput input,
                                 ObjectSubstitutionInterface substitution)
                          throws java.io.IOException
Specified by:
readData in interface Persister
Throws:
java.io.IOException

defaultRead

public static java.lang.Object defaultRead(java.io.ObjectInput input,
                                           java.lang.Object obj,
                                           ClassMetaData metaData,
                                           ObjectSubstitutionInterface substitution)
                                    throws java.io.IOException
Throws:
java.io.IOException


JBoss Serialization, a new approach to java-serialization.