Package org.jboss.marshalling
Class MarshallingConfiguration
- java.lang.Object
-
- org.jboss.marshalling.MarshallingConfiguration
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class MarshallingConfiguration extends java.lang.Object implements java.lang.Cloneable
A Marshaller configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private int
bufferSize
private int
classCount
private ClassExternalizerFactory
classExternalizerFactory
private ClassResolver
classResolver
private ClassTable
classTable
private Creator
creator
private ExceptionListener
exceptionListener
private Creator
externalizerCreator
private int
instanceCount
private ObjectResolver
objectPreResolver
private ObjectResolver
objectResolver
private ObjectTable
objectTable
private SerializabilityChecker
serializabilityChecker
private Creator
serializedCreator
private StreamHeader
streamHeader
private int
version
-
Constructor Summary
Constructors Constructor Description MarshallingConfiguration()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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, ornull
if none is specified.ClassResolver
getClassResolver()
Get the class resolver, ornull
if none is specified.ClassTable
getClassTable()
Get the class table, ornull
if none is specified.Creator
getCreator()
Deprecated.no longer used in 1.4, will be removed in a future versionExceptionListener
getExceptionListener()
Get the exception listener to use.Creator
getExternalizerCreator()
Deprecated.no longer used in 1.4, will be removed in 1.4int
getInstanceCount()
Get the estimated instance count for this configuration.ObjectResolver
getObjectPreResolver()
Get the object pre resolver, ornull
if none is specified.ObjectResolver
getObjectResolver()
Get the object resolver, ornull
if none is specified.ObjectTable
getObjectTable()
Get the object table, ornull
if none is specified.SerializabilityChecker
getSerializabilityChecker()
Get the serializability checker.Creator
getSerializedCreator()
Deprecated.no longer used in 1.4, will be removed in 1.4StreamHeader
getStreamHeader()
Get the stream header, ornull
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, ornull
to use the default.void
setClassTable(ClassTable classTable)
Set the class table, ornull
to use none.void
setCreator(Creator creator)
Deprecated.no longer used in 1.4, will be removed in a future versionvoid
setExceptionListener(ExceptionListener exceptionListener)
Set the exception listener to use.void
setExternalizerCreator(Creator externalizerCreator)
Deprecated.no longer used in 1.4, will be removed in 1.4void
setInstanceCount(int instanceCount)
Set the estimated instance count for this configuration.void
setObjectPreResolver(ObjectResolver objectPreResolver)
Set the object pre resolver, ornull
to use none.void
setObjectResolver(ObjectResolver objectResolver)
Set the object resolver, ornull
to use none.void
setObjectTable(ObjectTable objectTable)
Set the object table, ornull
to use none.void
setSerializabilityChecker(SerializabilityChecker serializabilityChecker)
Set the serializability checker.void
setSerializedCreator(Creator serializedCreator)
Deprecated.no longer used in 1.4, will be removed in 1.4void
setStreamHeader(StreamHeader streamHeader)
Set the stream header.void
setVersion(int version)
Set the version to use, for protocols with multiple versions.java.lang.String
toString()
-
-
-
Field Detail
-
classExternalizerFactory
private ClassExternalizerFactory classExternalizerFactory
-
streamHeader
private StreamHeader streamHeader
-
classResolver
private ClassResolver classResolver
-
objectResolver
private ObjectResolver objectResolver
-
creator
private Creator creator
-
externalizerCreator
private Creator externalizerCreator
-
serializedCreator
private Creator serializedCreator
-
classTable
private ClassTable classTable
-
objectTable
private ObjectTable objectTable
-
exceptionListener
private ExceptionListener exceptionListener
-
serializabilityChecker
private SerializabilityChecker serializabilityChecker
-
instanceCount
private int instanceCount
-
classCount
private int classCount
-
bufferSize
private int bufferSize
-
version
private int version
-
objectPreResolver
private ObjectResolver objectPreResolver
-
-
Method Detail
-
getClassExternalizerFactory
public ClassExternalizerFactory getClassExternalizerFactory()
Get the class externalizer factory, ornull
if none is specified.- Returns:
- the class externalizer factory
-
setClassExternalizerFactory
public void setClassExternalizerFactory(ClassExternalizerFactory classExternalizerFactory)
Set the class externalizer factory. Specifynull
to use none.- Parameters:
classExternalizerFactory
- the class externalizer factory
-
getStreamHeader
public StreamHeader getStreamHeader()
Get the stream header, ornull
if none is specified.- Returns:
- the stream header
-
setStreamHeader
public void setStreamHeader(StreamHeader streamHeader)
Set the stream header. Specifynull
to use none.- Parameters:
streamHeader
- the stream header
-
getClassResolver
public ClassResolver getClassResolver()
Get the class resolver, ornull
if none is specified.- Returns:
- the class resolver
-
setClassResolver
public void setClassResolver(ClassResolver classResolver)
Set the class resolver, ornull
to use the default.- Parameters:
classResolver
- the class resolver
-
getObjectResolver
public ObjectResolver getObjectResolver()
Get the object resolver, ornull
if none is specified.- Returns:
- the object resolver
-
setObjectResolver
public void setObjectResolver(ObjectResolver objectResolver)
Set the object resolver, ornull
to use none.- Parameters:
objectResolver
- the object resolver
-
getCreator
@Deprecated public Creator getCreator()
Deprecated.no longer used in 1.4, will be removed in a future versionGet the object creator, ornull
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.no longer used in 1.4, will be removed in a future versionSet the object creator, ornull
to use the default. Used only if a more specific creator type was not specified.- Parameters:
creator
- the object creator
-
getObjectPreResolver
public ObjectResolver getObjectPreResolver()
Get the object pre resolver, ornull
if none is specified.- Returns:
- the object resolver
-
setObjectPreResolver
public void setObjectPreResolver(ObjectResolver objectPreResolver)
Set the object pre resolver, ornull
to use none. Invoked before user replacement and global object resolver- Parameters:
objectPreResolver
- the object resolver
-
getClassTable
public ClassTable getClassTable()
Get the class table, ornull
if none is specified.- Returns:
- the class table
-
setClassTable
public void setClassTable(ClassTable classTable)
Set the class table, ornull
to use none.- Parameters:
classTable
- the class table
-
getObjectTable
public ObjectTable getObjectTable()
Get the object table, ornull
if none is specified.- Returns:
- the object table
-
setObjectTable
public void setObjectTable(ObjectTable objectTable)
Set the object table, ornull
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
@Deprecated public Creator getExternalizerCreator()
Deprecated.no longer used in 1.4, will be removed in 1.4Get the creator to use for externalized objects. If none was configured, returns the result ofgetCreator()
.- Returns:
- the creator
-
setExternalizerCreator
@Deprecated public void setExternalizerCreator(Creator externalizerCreator)
Deprecated.no longer used in 1.4, will be removed in 1.4Set the creator to use for externalized objects.- Parameters:
externalizerCreator
- the creator
-
getSerializedCreator
@Deprecated public Creator getSerializedCreator()
Deprecated.no longer used in 1.4, will be removed in 1.4Get the creator to use for serialized objects. If none was configured, returns the result ofgetCreator()
.- Returns:
- the creator
-
setSerializedCreator
@Deprecated public void setSerializedCreator(Creator serializedCreator)
Deprecated.no longer used in 1.4, will be removed in 1.4Set 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 classjava.lang.Object
- Returns:
- a clone
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-