corda / net.corda.core.serialization / SerializationSchemeContext


@DoNotImplement interface SerializationSchemeContext

This is used to pass information into CustomSerializationScheme about how the object should be (de)serialized. This context can change depending on the specific circumstances in the node when (de)serialization occurs.



abstract val deserializationClassLoader: ClassLoader

The class loader to use for deserialization. This is guaranteed to be able to load all the required classes passed into CustomSerializationScheme.deserialize.


abstract val properties: Map<Any, Any>

A map of any additional properties specific to the particular use case. If these properties are set via toWireTransaction then they might not be available when deserializing. If the properties are required when deserializing, they can be added into the blob when serializing and read back when deserializing.


abstract val whitelist: ClassWhitelist

A whitelist that contains (mostly for security purposes) which classes are authorised to be deserialized. A secure implementation will not instantiate any object which is not either whitelisted or annotated with CordaSerializable when deserializing. To catch classes missing from the whitelist as early as possible it is HIGHLY recommended to also check this whitelist when serializing (as well as deserializing) objects.

Extension Functions


fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.