org.jboss.marshalling.river
Class RiverMarshaller

java.lang.Object
  extended by org.jboss.marshalling.AbstractMarshaller
      extended by org.jboss.marshalling.river.RiverMarshaller
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput, ByteOutput, Marshaller

public class RiverMarshaller
extends AbstractMarshaller


Field Summary
 
Fields inherited from class org.jboss.marshalling.AbstractMarshaller
bufferSize, byteOutput, classExternalizerFactory, classResolver, classTable, configuredVersion, creator, externalizerFactory, objectResolver, objectTable, streamHeader
 
Constructor Summary
protected RiverMarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration)
           
 
Method Summary
 void clearClassCache()
          Discard the class cache.
 void clearInstanceCache()
          Discard the instance cache.
protected  void doAnnotateClass(java.lang.Class<?> objClass)
           
protected  void doStart()
          Perform any marshaller-specific start activity.
protected  void doWriteFields(SerializableClass info, java.lang.Object obj)
           
protected  void doWriteObject(java.lang.Object original, boolean unshared)
          Implementation of the actual object-writing method.
protected  void doWriteSerializableObject(SerializableClass info, java.lang.Object obj, java.lang.Class<?> objClass)
           
protected  BlockMarshaller getBlockMarshaller()
           
protected  java.io.ObjectOutput getObjectOutput()
           
protected  void writeClass(java.lang.Class<?> objClass)
           
protected  void writeClassClass(java.lang.Class<?> classObj)
           
protected  void writeEnumClass(java.lang.Class<? extends java.lang.Enum> objClass)
           
protected  void writeExternalizableClass(java.lang.Class<?> objClass)
           
protected  void writeExternalizerClass(java.lang.Class<?> objClass, Externalizer externalizer)
           
protected  boolean writeKnownClass(java.lang.Class<?> objClass)
           
protected  void writeNewClass(java.lang.Class<?> objClass)
           
protected  void writeNewEnumClass(java.lang.Class<? extends java.lang.Enum> objClass)
           
protected  void writeNewExternalizableClass(java.lang.Class<?> objClass)
           
protected  void writeNewExternalizerClass(java.lang.Class<?> objClass, Externalizer externalizer)
           
protected  void writeNewProxyClass(java.lang.Class<?> objClass)
           
protected  void writeNewSerializableClass(java.lang.Class<?> objClass)
           
protected  void writeObjectArrayClass(java.lang.Class<?> objClass)
           
protected  void writeProxyClass(java.lang.Class<?> objClass)
           
protected  void writeSerializableClass(java.lang.Class<?> objClass)
           
 void writeUTF(java.lang.String string)
          
 
Methods inherited from class org.jboss.marshalling.AbstractMarshaller
close, finish, flush, start, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeObjectUnshared, writeShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RiverMarshaller

protected RiverMarshaller(RiverMarshallerFactory marshallerFactory,
                          SerializableClassRegistry registry,
                          MarshallingConfiguration configuration)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

doWriteObject

protected void doWriteObject(java.lang.Object original,
                             boolean unshared)
                      throws java.io.IOException
Description copied from class: AbstractMarshaller
Implementation of the actual object-writing method.

Specified by:
doWriteObject in class AbstractMarshaller
Parameters:
original - the object to write
unshared - true if the instance is unshared, false if it is shared
Throws:
java.io.IOException - if an I/O error occurs

getObjectOutput

protected java.io.ObjectOutput getObjectOutput()

getBlockMarshaller

protected BlockMarshaller getBlockMarshaller()

doWriteSerializableObject

protected void doWriteSerializableObject(SerializableClass info,
                                         java.lang.Object obj,
                                         java.lang.Class<?> objClass)
                                  throws java.io.IOException
Throws:
java.io.IOException

doWriteFields

protected void doWriteFields(SerializableClass info,
                             java.lang.Object obj)
                      throws java.io.IOException
Throws:
java.io.IOException

writeProxyClass

protected void writeProxyClass(java.lang.Class<?> objClass)
                        throws java.io.IOException
Throws:
java.io.IOException

writeNewProxyClass

protected void writeNewProxyClass(java.lang.Class<?> objClass)
                           throws java.io.IOException
Throws:
java.io.IOException

writeEnumClass

protected void writeEnumClass(java.lang.Class<? extends java.lang.Enum> objClass)
                       throws java.io.IOException
Throws:
java.io.IOException

writeNewEnumClass

protected void writeNewEnumClass(java.lang.Class<? extends java.lang.Enum> objClass)
                          throws java.io.IOException
Throws:
java.io.IOException

writeClassClass

protected void writeClassClass(java.lang.Class<?> classObj)
                        throws java.io.IOException
Throws:
java.io.IOException

writeObjectArrayClass

protected void writeObjectArrayClass(java.lang.Class<?> objClass)
                              throws java.io.IOException
Throws:
java.io.IOException

writeClass

protected void writeClass(java.lang.Class<?> objClass)
                   throws java.io.IOException
Throws:
java.io.IOException

writeNewClass

protected void writeNewClass(java.lang.Class<?> objClass)
                      throws java.io.IOException
Throws:
java.io.IOException

writeKnownClass

protected boolean writeKnownClass(java.lang.Class<?> objClass)
                           throws java.io.IOException
Throws:
java.io.IOException

writeSerializableClass

protected void writeSerializableClass(java.lang.Class<?> objClass)
                               throws java.io.IOException
Throws:
java.io.IOException

writeNewSerializableClass

protected void writeNewSerializableClass(java.lang.Class<?> objClass)
                                  throws java.io.IOException
Throws:
java.io.IOException

writeExternalizableClass

protected void writeExternalizableClass(java.lang.Class<?> objClass)
                                 throws java.io.IOException
Throws:
java.io.IOException

writeNewExternalizableClass

protected void writeNewExternalizableClass(java.lang.Class<?> objClass)
                                    throws java.io.IOException
Throws:
java.io.IOException

writeExternalizerClass

protected void writeExternalizerClass(java.lang.Class<?> objClass,
                                      Externalizer externalizer)
                               throws java.io.IOException
Throws:
java.io.IOException

writeNewExternalizerClass

protected void writeNewExternalizerClass(java.lang.Class<?> objClass,
                                         Externalizer externalizer)
                                  throws java.io.IOException
Throws:
java.io.IOException

doAnnotateClass

protected void doAnnotateClass(java.lang.Class<?> objClass)
                        throws java.io.IOException
Throws:
java.io.IOException

clearInstanceCache

public void clearInstanceCache()
                        throws java.io.IOException
Description copied from interface: Marshaller
Discard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.

Throws:
java.io.IOException - if an error occurs

clearClassCache

public void clearClassCache()
                     throws java.io.IOException
Description copied from interface: Marshaller
Discard the class cache. Implicitly also discards the instance cache.

Throws:
java.io.IOException - if an error occurs

doStart

protected void doStart()
                throws java.io.IOException
Description copied from class: AbstractMarshaller
Perform any marshaller-specific start activity. This implementation simply writes the stream header.

Overrides:
doStart in class AbstractMarshaller
Throws:
java.io.IOException - if I/O exception occurs

writeUTF

public void writeUTF(java.lang.String string)
              throws java.io.IOException
Description copied from class: AbstractMarshaller

Specified by:
writeUTF in interface java.io.DataOutput
Overrides:
writeUTF in class AbstractMarshaller
Throws:
java.io.IOException