JBoss Marshalling 1.3.0.CR9

org.jboss.marshalling
Class MarshallingConfiguration

java.lang.Object
  extended by org.jboss.marshalling.MarshallingConfiguration
All Implemented Interfaces:
Cloneable

public final class MarshallingConfiguration
extends Object
implements Cloneable

A Marshaller configuration.


Constructor Summary
MarshallingConfiguration()
          Construct a new instance.
 
Method Summary
 MarshallingConfiguration clone()
          Create a shallow clone.
 int getBufferSize()
          Get the configured buffer size.
 int getClassCount()
          Get the estimated class count for this configuration.
 ClassExternalizerFactory getClassExternalizerFactory()
          Get the class externalizer factory, or null if none is specified.
 ClassResolver getClassResolver()
          Get the class resolver, or null if none is specified.
 ClassTable getClassTable()
          Get the class table, or null if none is specified.
 Creator getCreator()
          Deprecated. Use getExternalizerCreator() or getSerializedCreator() instead.
 ExceptionListener getExceptionListener()
          Get the exception listener to use.
 Creator getExternalizerCreator()
          Get the creator to use for externalized objects.
 int getInstanceCount()
          Get the estimated instance count for this configuration.
 ObjectResolver getObjectResolver()
          Get the object resolver, or null if none is specified.
 ObjectTable getObjectTable()
          Get the object table, or null if none is specified.
 SerializabilityChecker getSerializabilityChecker()
          Get the serializability checker.
 Creator getSerializedCreator()
          Get the creator to use for serialized objects.
 StreamHeader getStreamHeader()
          Get the stream header, or null if none is specified.
 int getVersion()
          Get the version to use, for protocols with multiple versions.
 void setBufferSize(int bufferSize)
          Set the configured buffer size.
 void setClassCount(int classCount)
          Set the estimated class count for this configuration.
 void setClassExternalizerFactory(ClassExternalizerFactory classExternalizerFactory)
          Set the class externalizer factory.
 void setClassResolver(ClassResolver classResolver)
          Set the class resolver, or null to use the default.
 void setClassTable(ClassTable classTable)
          Set the class table, or null to use none.
 void setCreator(Creator creator)
          Deprecated. Use setExternalizerCreator(Creator) or setSerializedCreator(Creator) instead.
 void setExceptionListener(ExceptionListener exceptionListener)
          Set the exception listener to use.
 void setExternalizerCreator(Creator externalizerCreator)
          Set the creator to use for externalized objects.
 void setInstanceCount(int instanceCount)
          Set the estimated instance count for this configuration.
 void setObjectResolver(ObjectResolver objectResolver)
          Set the object resolver, or null to use none.
 void setObjectTable(ObjectTable objectTable)
          Set the object table, or null to use none.
 void setSerializabilityChecker(SerializabilityChecker serializabilityChecker)
          Set the serializability checker.
 void setSerializedCreator(Creator serializedCreator)
          Set the creator to use for serialized objects.
 void setStreamHeader(StreamHeader streamHeader)
          Set the stream header.
 void setVersion(int version)
          Set the version to use, for protocols with multiple versions.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarshallingConfiguration

public MarshallingConfiguration()
Construct a new instance.

Method Detail

getClassExternalizerFactory

public ClassExternalizerFactory getClassExternalizerFactory()
Get the class externalizer factory, or null if none is specified.

Returns:
the class externalizer factory

setClassExternalizerFactory

public void setClassExternalizerFactory(ClassExternalizerFactory classExternalizerFactory)
Set the class externalizer factory. Specify null to use none.

Parameters:
classExternalizerFactory - the class externalizer factory

getStreamHeader

public StreamHeader getStreamHeader()
Get the stream header, or null if none is specified.

Returns:
the stream header

setStreamHeader

public void setStreamHeader(StreamHeader streamHeader)
Set the stream header. Specify null to use none.

Parameters:
streamHeader - the stream header

getClassResolver

public ClassResolver getClassResolver()
Get the class resolver, or null if none is specified.

Returns:
the class resolver

setClassResolver

public void setClassResolver(ClassResolver classResolver)
Set the class resolver, or null to use the default.

Parameters:
classResolver - the class resolver

getObjectResolver

public ObjectResolver getObjectResolver()
Get the object resolver, or null if none is specified.

Returns:
the object resolver

setObjectResolver

public void setObjectResolver(ObjectResolver objectResolver)
Set the object resolver, or null to use none.

Parameters:
objectResolver - the object resolver

getCreator

@Deprecated
public Creator getCreator()
Deprecated. Use getExternalizerCreator() or getSerializedCreator() instead.

Get the object creator, or null if none is specified. Used only if a more specific creator type was not specified.

Returns:
the object creator

setCreator

@Deprecated
public void setCreator(Creator creator)
Deprecated. Use setExternalizerCreator(Creator) or setSerializedCreator(Creator) instead.

Set the object creator, or null to use the default. Used only if a more specific creator type was not specified.

Parameters:
creator - the object creator

getClassTable

public ClassTable getClassTable()
Get the class table, or null if none is specified.

Returns:
the class table

setClassTable

public void setClassTable(ClassTable classTable)
Set the class table, or null to use none.

Parameters:
classTable - the class table

getObjectTable

public ObjectTable getObjectTable()
Get the object table, or null if none is specified.

Returns:
the object table

setObjectTable

public void setObjectTable(ObjectTable objectTable)
Set the object table, or null to use none.

Parameters:
objectTable - the object table

getInstanceCount

public int getInstanceCount()
Get the estimated instance count for this configuration.

Returns:
the instance count

setInstanceCount

public void setInstanceCount(int instanceCount)
Set the estimated instance count for this configuration. The given value is used to pre-size certain internal tables in some implementations.

Parameters:
instanceCount - the instance count

getClassCount

public int getClassCount()
Get the estimated class count for this configuration.

Returns:
the class count

setClassCount

public void setClassCount(int classCount)
Set the estimated class count for this configuration. The given value is used to pre-size certain internal tables in some implementations.

Parameters:
classCount - the class count

getBufferSize

public int getBufferSize()
Get the configured buffer size.

Returns:
the buffer size, in bytes

setBufferSize

public void setBufferSize(int bufferSize)
Set the configured buffer size. Some implementations will use this value to set the size of internal read/write buffers.

Parameters:
bufferSize - the buffer size, in bytes

getVersion

public int getVersion()
Get the version to use, for protocols with multiple versions.

Returns:
the version to use

setVersion

public void setVersion(int version)
Set the version to use, for protocols with multiple versions.

Parameters:
version - the version to use

getExceptionListener

public ExceptionListener getExceptionListener()
Get the exception listener to use.

Returns:
the exception listener

setExceptionListener

public void setExceptionListener(ExceptionListener exceptionListener)
Set the exception listener to use.

Parameters:
exceptionListener - the exception listener

getExternalizerCreator

public Creator getExternalizerCreator()
Get the creator to use for externalized objects. If none was configured, returns the result of getCreator().

Returns:
the creator

setExternalizerCreator

public void setExternalizerCreator(Creator externalizerCreator)
Set the creator to use for externalized objects.

Parameters:
externalizerCreator - the creator

getSerializedCreator

public Creator getSerializedCreator()
Get the creator to use for serialized objects. If none was configured, returns the result of getCreator().

Returns:
the creator

setSerializedCreator

public void setSerializedCreator(Creator serializedCreator)
Set the creator to use for serialized objects.

Parameters:
serializedCreator - the creator

getSerializabilityChecker

public SerializabilityChecker getSerializabilityChecker()
Get the serializability checker.

Returns:
the serializability checker

setSerializabilityChecker

public void setSerializabilityChecker(SerializabilityChecker serializabilityChecker)
Set the serializability checker.

Parameters:
serializabilityChecker - the new serializability checker

clone

public MarshallingConfiguration clone()
Create a shallow clone.

Overrides:
clone in class Object
Returns:
a clone

toString

public String toString()
Overrides:
toString in class Object

JBoss Marshalling 1.3.0.CR9

Copyright © 2011 JBoss, a division of Red Hat, Inc.