corda / net.corda.core.serialization / CheckpointCustomSerializer


interface CheckpointCustomSerializer<OBJ, PROXY>

Allows CorDapps to provide custom serializers for classes that do not serialize successfully during a checkpoint. In this case, a proxy serializer can be written that implements this interface whose purpose is to move between unserializable types and an intermediate representation.

NOTE: Only implement this interface if you have a class that triggers an error during normal checkpoint serialization/deserialization.



abstract fun fromProxy(proxy: PROXY): OBJ

Should facilitate the conversion of the proxy object into a new instance of the unserializable type


abstract fun toProxy(obj: OBJ): PROXY

Should facilitate the conversion of the third party object into the serializable local class specified by PROXY

Extension Functions


fun Any.contextLogger(): <ERROR CLASS>

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