Class SchemaRetrievalHandler

java.lang.Object
ai.pipestream.registration.handlers.SchemaRetrievalHandler

@ApplicationScoped public class SchemaRetrievalHandler extends Object
Retrieves module configuration schemas from the platform registry (DB, then Apicurio).

Blocking — invoked from virtual threads by the gRPC/REST layers.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the handler bean.
  • Method Summary

    Modifier and Type
    Method
    Description
    ai.pipestream.platform.registration.v1.GetModuleSchemaResponse
    getModuleSchema(ai.pipestream.platform.registration.v1.GetModuleSchemaRequest request)
    Retrieves a module's config schema, trying the platform database first and falling back to Apicurio.
    ai.pipestream.platform.registration.v1.GetModuleSchemaVersionsResponse
    getModuleSchemaVersions(ai.pipestream.platform.registration.v1.GetModuleSchemaVersionsRequest request)
    Lists all stored schema versions for a module, ordered by version descending.
    ai.pipestream.platform.registration.v1.GetSchemaArtifactResponse
    getSchemaArtifact(ai.pipestream.platform.registration.v1.GetSchemaArtifactRequest request)
    One door for every named schema artifact.

    Methods inherited from class Object

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

    • SchemaRetrievalHandler

      public SchemaRetrievalHandler()
      Creates the handler bean. The Apicurio client and module repository it reads from are supplied by CDI field injection.
  • Method Details

    • getModuleSchema

      public ai.pipestream.platform.registration.v1.GetModuleSchemaResponse getModuleSchema(ai.pipestream.platform.registration.v1.GetModuleSchemaRequest request)
      Retrieves a module's config schema, trying the platform database first and falling back to Apicurio.
      Parameters:
      request - the request naming the module and optional version
      Returns:
      the schema response
      Throws:
      io.grpc.StatusRuntimeException - with NOT_FOUND when no schema exists, or INTERNAL on unexpected failure
    • getSchemaArtifact

      public ai.pipestream.platform.registration.v1.GetSchemaArtifactResponse getSchemaArtifact(ai.pipestream.platform.registration.v1.GetSchemaArtifactRequest request)
      One door for every named schema artifact. Lookup order:
      1. DB ConfigSchema rows keyed by the artifact name (module config schemas AND extra artifacts like chunker-recipe land here at registration);
      2. Apicurio platform schema group (artifacts synced from here, or published by other services under the exact name);
      3. Apicurio descriptor group ("default") — protobuf DESCRIPTOR artifacts the proto pipeline publishes (e.g. "account-events"), served as application/x-protobuf.
      Parameters:
      request - the request naming the artifact and optional version
      Returns:
      the artifact response with content, content type, and version
      Throws:
      io.grpc.StatusRuntimeException - with INVALID_ARGUMENT for a blank name, NOT_FOUND when no artifact matches, or INTERNAL on unexpected failure
    • getModuleSchemaVersions

      public ai.pipestream.platform.registration.v1.GetModuleSchemaVersionsResponse getModuleSchemaVersions(ai.pipestream.platform.registration.v1.GetModuleSchemaVersionsRequest request)
      Lists all stored schema versions for a module, ordered by version descending.
      Parameters:
      request - the request naming the module
      Returns:
      the response listing the module's schema versions