org.fuin.serialver4j.hessian
Class AbstractVersioningHessianSerializer

java.lang.Object
  extended by org.fuin.serialver4j.hessian.AbstractVersioningHessianSerializer
All Implemented Interfaces:
VersioningSerializer
Direct Known Subclasses:
VersioningBurlapSerializer, VersioningHessian2Serializer, VersioningHessianSerializer

public abstract class AbstractVersioningHessianSerializer
extends Object
implements VersioningSerializer

Serializes and deserializes a given object using hessian or burlap.


Constructor Summary
AbstractVersioningHessianSerializer(ClassesHistory history, int pushbackBufSize, com.caucho.hessian.io.SerializerFactory serializerFactory)
          Constructor with history.
 
Method Summary
 int getPushbackBufSize()
          Returns the size of the push back buffer.
 String getVersionTag()
          Returns the version tag from the history.
protected  Object readObject(com.caucho.hessian.io.AbstractHessianInput input, long version, String type)
          Reads an object of the given type from the input converting it to the current version.
protected  void serialize(com.caucho.hessian.io.AbstractHessianOutput output, Object obj)
          Serializes the object using the given hessian output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fuin.serialver4j.base.VersioningSerializer
deserialize, serialize
 

Constructor Detail

AbstractVersioningHessianSerializer

public AbstractVersioningHessianSerializer(ClassesHistory history,
                                           int pushbackBufSize,
                                           com.caucho.hessian.io.SerializerFactory serializerFactory)
Constructor with history.

Parameters:
history - History to use.
pushbackBufSize - Size of the push back buffer.
serializerFactory - Serializer factory to use.
Method Detail

serialize

protected final void serialize(com.caucho.hessian.io.AbstractHessianOutput output,
                               Object obj)
                        throws IOException
Serializes the object using the given hessian output.

Parameters:
output - Output to use.
obj - Object to write to the output.
Throws:
IOException - Error writing to the output.

readObject

protected final Object readObject(com.caucho.hessian.io.AbstractHessianInput input,
                                  long version,
                                  String type)
                           throws IOException
Reads an object of the given type from the input converting it to the current version.

Parameters:
input - Input to use.
version - Version of the object on the input.
type - Type of the object on the input.
Returns:
Object converted into the current type.
Throws:
IOException - Error reading from the input.

getPushbackBufSize

public final int getPushbackBufSize()
Returns the size of the push back buffer.

Returns:
Size of the push back buffer.

getVersionTag

public final String getVersionTag()
Returns the version tag from the history.

Returns:
Name of the version tag.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.