Class MarshallingConfiguration

  • All Implemented Interfaces:
    java.lang.Cloneable

    public final class MarshallingConfiguration
    extends java.lang.Object
    implements java.lang.Cloneable
    A Marshaller configuration.
    • 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.
        no longer used in 1.4, will be removed in a future version
        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.
        no longer used in 1.4, will be removed in a future version
        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
      • getObjectPreResolver

        public ObjectResolver getObjectPreResolver()
        Get the object pre resolver, or null if none is specified.
        Returns:
        the object resolver
      • setObjectPreResolver

        public void setObjectPreResolver​(ObjectResolver objectPreResolver)
        Set the object pre resolver, or null to use none. Invoked before user replacement and global object resolver
        Parameters:
        objectPreResolver - the object resolver
      • 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

        @Deprecated
        public Creator getExternalizerCreator()
        Deprecated.
        no longer used in 1.4, will be removed in 1.4
        Get the creator to use for externalized objects. If none was configured, returns the result of getCreator().
        Returns:
        the creator
      • setExternalizerCreator

        @Deprecated
        public void setExternalizerCreator​(Creator externalizerCreator)
        Deprecated.
        no longer used in 1.4, will be removed in 1.4
        Set 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.4
        Get the creator to use for serialized objects. If none was configured, returns the result of getCreator().
        Returns:
        the creator
      • setSerializedCreator

        @Deprecated
        public void setSerializedCreator​(Creator serializedCreator)
        Deprecated.
        no longer used in 1.4, will be removed in 1.4
        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 java.lang.Object
        Returns:
        a clone
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object