Class SchemaRetrievalHandler
java.lang.Object
ai.pipestream.registration.handlers.SchemaRetrievalHandler
Retrieves module configuration schemas from the platform registry (DB, then Apicurio).
Blocking — invoked from virtual threads by the gRPC/REST layers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionai.pipestream.platform.registration.v1.GetModuleSchemaResponsegetModuleSchema(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.GetModuleSchemaVersionsResponsegetModuleSchemaVersions(ai.pipestream.platform.registration.v1.GetModuleSchemaVersionsRequest request) Lists all stored schema versions for a module, ordered by version descending.ai.pipestream.platform.registration.v1.GetSchemaArtifactResponsegetSchemaArtifact(ai.pipestream.platform.registration.v1.GetSchemaArtifactRequest request) One door for every named schema artifact.
-
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- withNOT_FOUNDwhen no schema exists, orINTERNALon 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:- DB ConfigSchema rows keyed by the artifact name (module config
schemas AND extra artifacts like
chunker-recipeland here at registration); - Apicurio platform schema group (artifacts synced from here, or published by other services under the exact name);
- 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- withINVALID_ARGUMENTfor a blank name,NOT_FOUNDwhen no artifact matches, orINTERNALon unexpected failure
- DB ConfigSchema rows keyed by the artifact name (module config
schemas AND extra artifacts like
-
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
-