Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-152

Split SerializationContextInitializer into 2 separate interfaces, one to register schemas+marshallers and one to provide access to the generated schema

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 4.3.4.Final, 4.4.0.Alpha1
    • 4.3.3.Final
    • None
    • False
    • False

      We need a way to support generating marshallers without always generating a schema.

      For that we can introduce a new flag in AutoProtoSchemaBuilder , marshallersOnly (default false), that will cause schema generation and registration to be skipped.

      But the current form of SerializationContextInitializer interface mixes up access to the name and contents of the generated schema and the registration of generated marshallers and schemas, and if marshallersOnly=true it's unclear what getProtoFileName() and getProtoFile() should return.

      To fix that we should move methods getProtoFileName() and getProtoFile() to a sub-interface called GeneratedSchema. All generated SerializationContextInitializer implementations will implement this interface, unless marshallersOnly=true, in which case they will implement SerializationContextInitializer only.

      The methods will not be really moved right now, they will be temporarily kept in SerializationContextInitializer also and will only be removed for good in version 5.

       

       

              anistor Adrian Nistor (Inactive)
              anistor Adrian Nistor (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: