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

    XMLWordPrintable

Details

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

    Description

      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.

       

       

      Attachments

        Activity

          People

            anistor Adrian Nistor (Inactive)
            anistor Adrian Nistor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: