Class ProtobufTypeRegistryProducer

java.lang.Object
ai.pipestream.module.pipelineprobe.ProtobufTypeRegistryProducer

@Singleton public class ProtobufTypeRegistryProducer extends Object
Produces a protobuf TypeRegistry populated from generated Java classes. This enables JsonFormat.Printer to resolve google.protobuf.Any fields (e.g. TikaResponse packed inside PipeDoc). When the shared pipestream extension provides this bean natively, delete this class.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the producer.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.protobuf.TypeRegistry
    Builds the singleton protobuf TypeRegistry by seeding it with a fixed set of generated message descriptors, transitively collecting their file-descriptor dependencies, and registering every (including nested) message type.

    Methods inherited from class Object

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

    • ProtobufTypeRegistryProducer

      public ProtobufTypeRegistryProducer()
      Creates the producer. Instances are managed by CDI.
  • Method Details

    • typeRegistry

      @Produces @Singleton public com.google.protobuf.TypeRegistry typeRegistry()
      Builds the singleton protobuf TypeRegistry by seeding it with a fixed set of generated message descriptors, transitively collecting their file-descriptor dependencies, and registering every (including nested) message type. Duplicate types are ignored. The registry lets JsonFormat resolve google.protobuf.Any fields by their packed type.
      Returns:
      the populated protobuf type registry