Interface SerializationCustomSerializer

  • All Implemented Interfaces:

    
    public interface SerializationCustomSerializer<OBJ, PROXY>
    
                        

    Allows CorDapps to provide custom serializers for third-party libraries that cannot be recompiled with the -parameters flag rendering their classes natively serializable by Corda. In this case, a proxy serializer can be written that extends this type whose purpose is to move between those unserializable types and an intermediate representation. NOTE: The proxy object should be specified as a separate class. However, this can be defined within the scope of the custom serializer.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract PROXY toProxy(@NotNull() OBJ obj) Facilitates the conversion of the third-party object into the serializable local class specified by PROXY.
      abstract OBJ fromProxy(@NotNull() PROXY proxy) Facilitates the conversion of the proxy object into a new instance of the unserializable type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • toProxy

        @NotNull() abstract PROXY toProxy(@NotNull() OBJ obj)

        Facilitates the conversion of the third-party object into the serializable local class specified by PROXY.

        Parameters:
        obj - Original object for serialization.
      • fromProxy

        @NotNull() abstract OBJ fromProxy(@NotNull() PROXY proxy)

        Facilitates the conversion of the proxy object into a new instance of the unserializable type.

        Parameters:
        proxy - Object from AMQP.