SerializationContext

Parameters to serialization and deserialization.

Types

Link copied to clipboard

The use case that we are serializing for, since it influences the implementations chosen.

Properties

Link copied to clipboard

If true, deserialization calls using this context will not fallback to using the Class Carpenter to attempt to construct classes present in the schema but not on the current classpath.

Link copied to clipboard

Additional custom serializers that will be made available during (de)serialization.

Link copied to clipboard

The class loader to use for deserialization.

Link copied to clipboard

If non-null, apply this encoding (typically compression) when serializing.

Link copied to clipboard

A whitelist that determines (mostly for security purposes) whether a particular encoding may be used when deserializing.

Link copied to clipboard

If true the carpenter will happily synthesis classes that implement interfaces containing methods that are not getters for any AMQP fields. Invoking these methods will throw an AbstractMethodError. If false then an exception will be thrown during deserialization instead.

Link copied to clipboard

Duplicate references to the same object preserved in the wire format and when deserialized when this is true, otherwise they appear as new copies of the object.

Link copied to clipboard

When serializing, use the format this header sequence represents.

Link copied to clipboard
abstract val preventDataLoss: Boolean

If true the serialization evolver will fail if the binary to be deserialized contains more fields then the current object from the classpath.

Link copied to clipboard
abstract val properties: Map<Any, Any>

A map of any additional properties specific to the particular use case.

Link copied to clipboard

The use case we are serializing or deserializing for. See UseCase.

Link copied to clipboard

A whitelist that contains (mostly for security purposes) which classes can be serialized and deserialized.

Functions

Link copied to clipboard

Does not do anything.

Link copied to clipboard

Helper method to return a new context based on this context with the deserialization class loader changed.

Link copied to clipboard

Helper method to return a new context based on this context with the given serializers added.

Link copied to clipboard

A shallow copy of this context but with the given (possibly null) encoding.

Link copied to clipboard

A shallow copy of this context but with the given encoding whitelist.

Link copied to clipboard

Return a new context based on this one but with a lenient carpenter.

Link copied to clipboard

Returns a copy of the current context with carpentry of unknown classes disabled. On encountering such a class during deserialization the Serialization framework will throw a NotSerializableException.

Link copied to clipboard

Helper method to return a new context based on this context with object references disabled.

Link copied to clipboard

Helper method to return a new context based on this context but with serialization using the format this header sequence represents.

Link copied to clipboard

Return a new context based on this one but with a strict evolution.

Link copied to clipboard
abstract fun withProperties(extraProperties: Map<Any, Any>): SerializationContext

Helper method to return a new context based on this context with the extra properties added.

Link copied to clipboard
abstract fun withProperty(property: Any, value: Any): SerializationContext

Helper method to return a new context based on this context with the property added.

Link copied to clipboard

Helper method to return a new context based on this context with the given list of classes specifically whitelisted.

Link copied to clipboard
abstract fun withWhitelisted(clazz: Class<*>): SerializationContext

Helper method to return a new context based on this context with the given class specifically whitelisted.