@DoNotImplement interface SerializationContext
Parameters to serialization and deserialization.
enum class UseCase
The use case that we are serializing for, since it influences the implementations chosen. |
abstract val carpenterDisabled: Boolean
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. |
|
abstract val customSerializers: Set<SerializationCustomSerializer<*, *>>
Additional custom serializers that will be made available during (de)serialization. |
|
abstract val deserializationClassLoader: ClassLoader
The class loader to use for deserialization. |
|
abstract val encoding: SerializationEncoding?
If non-null, apply this encoding (typically compression) when serializing. |
|
abstract val encodingWhitelist: EncodingWhitelist
A whitelist that determines (mostly for security purposes) whether a particular encoding may be used when deserializing. |
|
abstract val lenientCarpenterEnabled: Boolean
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. |
|
abstract val objectReferencesEnabled: Boolean
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. |
|
abstract val preferredSerializationVersion: SerializationMagic
When serializing, use the format this header sequence represents. |
|
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. |
|
abstract val properties: Map<Any, Any>
A map of any additional properties specific to the particular use case. |
|
abstract val useCase: UseCase
The use case we are serializing or deserializing for. See UseCase. |
|
abstract val whitelist: ClassWhitelist
A whitelist that contains (mostly for security purposes) which classes can be serialized and deserialized. |
abstract fun
Does not do anything. |
|
abstract fun withClassLoader(classLoader: ClassLoader): SerializationContext
Helper method to return a new context based on this context with the deserialization class loader changed. |
|
abstract fun withCustomSerializers(serializers: Set<SerializationCustomSerializer<*, *>>): SerializationContext
Helper method to return a new context based on this context with the given serializers added. |
|
abstract fun withEncoding(encoding: SerializationEncoding?): SerializationContext
A shallow copy of this context but with the given (possibly null) encoding. |
|
abstract fun withEncodingWhitelist(encodingWhitelist: EncodingWhitelist): SerializationContext
A shallow copy of this context but with the given encoding whitelist. |
|
abstract fun withLenientCarpenter(): SerializationContext
Return a new context based on this one but with a lenient carpenter. |
|
abstract fun withPreferredSerializationVersion(magic: SerializationMagic): SerializationContext
Helper method to return a new context based on this context but with serialization using the format this header sequence represents. |
|
abstract fun withPreventDataLoss(): SerializationContext
Return a new context based on this one but with a strict evolution. |
|
abstract fun withProperties(extraProperties: Map<Any, Any>): SerializationContext
Helper method to return a new context based on this context with the extra properties added. |
|
abstract fun withProperty(property: Any, value: Any): SerializationContext
Helper method to return a new context based on this context with the property added. |
|
abstract fun withWhitelisted(clazz: Class<*>): SerializationContext
Helper method to return a new context based on this context with the given class specifically whitelisted. |
|
abstract fun withoutCarpenter(): SerializationContext
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. |
|
abstract fun withoutReferences(): SerializationContext
Helper method to return a new context based on this context with object references disabled. |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |
|
fun SerializationContext.withWhitelist(classes: List<Class<*>>): SerializationContext
Helper method to return a new context based on this context with the given list of classes specifically whitelisted. |