CORDA-553 - Review comments

This commit is contained in:
Katelyn Baker 2017-12-04 16:55:59 +00:00
parent fcec60e232
commit 1f7083cd61
2 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,6 @@ import java.net.URL
* @property schedulableFlows List of flows startable by the scheduler
* @property services List of RPC services
* @property serializationWhitelists List of Corda plugin registries
* @property serializationCustomSerializerProxies List of Proxy classes used by the custom serializers
* @property serializationCustomSerializers List of serializers
* @property customSchemas List of custom schemas
* @property jarPath The path to the JAR for this CorDapp

View File

@ -6,7 +6,7 @@ Pluggable Serializers for CorDapps
To be serializable by Corda Java classes must be compiled with the -parameters switch to enable matching of it's properties
to constructor parameters. This is important because Corda's internal AMQP serialization scheme will only construct
objects using their constructors. However, when recompilation isn't possible, or classes are built in such a way that
they cannot be easily modified for simple serailization, CorDapps can provide custom proxy serializers that Corda
they cannot be easily modified for simple serialization, CorDapps can provide custom proxy serializers that Corda
can use to move from types it cannot serialize to an interim representation that it can with the transformation to and
from this proxy object being handled by the supplied serializer.
@ -20,7 +20,7 @@ Serializers must
* Inherit from net.corda.core.serialization.SerializationCustomSerializer
* Be annotated with the @CordaCustomSerializer annotation
* Provide a proxy class to transform the object to and from
* Have that proxy class annotated with the @CordaCustomSerializerProxy annotation
* Implmenet the ``toProxy`` and ``fromProxy`` methods
Serializers inheriting from SerializationCustomSerializer have to implement two methods and two types
@ -47,7 +47,7 @@ Consider this example class
}
Without a custom serializer we cannot serialize this class as there is no public constructor that facilitates the
initialisation of all of its's properties.
initialisation of all of it's properties.
To be serializable by Corda this would require a custom serializer as follows
@ -55,7 +55,6 @@ To be serializable by Corda this would require a custom serializer as follows
@CordaCustomSerializer
class ExampleSerializer : SerializationCustomSerializer<Example, ExampleSerializer.Proxy> {
@CordaCustomSerializerProxy
data class Proxy(val a: Int, val b: Int)
override fun toProxy(obj: Example) = Proxy(obj.a, obj.b)