Class SerializerFactory


  • public class SerializerFactory
    extends java.lang.Object
    A factory for creation of instances of ISerializer and IDeserializer
    • Constructor Detail

      • SerializerFactory

        public SerializerFactory()
    • Method Detail

      • getSerializers

        public static Serializers getSerializers​(RecordClassDescriptor schema,
                                                 SerializerFactory.SerializerKind kind,
                                                 TypeLoader typeLoader)
                                          throws java.lang.ClassNotFoundException,
                                                 java.lang.IllegalArgumentException
        Creates instances of ISerializer and/or IDeserializer.
        Parameters:
        schema - Descriptor of the type to be serialized/deserialized
        kind - Kind of instances to create: Serializer, Deserializer or Both
        typeLoader - TypeLoader for the type described by schema; mustn't be null
        Returns:
        Serializers object with serializer or deserializer, or both
        Throws:
        java.lang.ClassNotFoundException - when the typeLoader cannot load the class described in the schema
        java.lang.IllegalArgumentException - when any of the method's parameters is null
      • getSerializers

        public static Serializers getSerializers​(RecordClassDescriptor[] schema,
                                                 SerializerFactory.SerializerKind kind,
                                                 TypeLoader typeLoader)
                                          throws java.lang.ClassNotFoundException,
                                                 java.lang.IllegalArgumentException
        Creates instances of ISerializer and/or IDeserializer.
        Parameters:
        schema - Array of descriptors of types to be serialized/deserialized
        kind - Kind of instances to create: Serializer, Deserializer or Both
        typeLoader - ITypeLoader for serializer and deserializer; mustn't be null
        Returns:
        Serializers object with serializer or deserializer, or both
        Throws:
        java.lang.ClassNotFoundException - when the typeLoader cannot load the class described in the schema
        java.lang.IllegalArgumentException - when any of the method's parameters is null