Class ProviderLinks
java.lang.Object
ai.redouble.nucleo.harness.models.ProviderLinks
The link between a catalog entry and the provider that serves it. A catalog is written for
the providers of the classpath that wrote it, and a process whose classpath carries others
(a native image built without an SDK the JVM build has) reads the same file. So a written
catalog records its providers under
PROVIDERS, each with its PLATFORM and
its ADDRESSING (the endpoint family its wire ids are spelled for,
ClientProvider.addressing()), and every entry its own PLATFORM: where it came
from is known at the moment it is written, and nowhere else afterwards.
A loader that finds an entry whose provider is not on its classpath links it to a
provider here of the same addressing (resolve(Map, String, ModelKind, String)): the first, in key order, that
claims the entry's model, else the first that
serves it, always of the entry's ModelKind. The
catalog id, the wire id and every field the entry states are kept; only the provider
changes. An entry no provider here of its addressing fits cannot be served by this process.
- Since:
- 0.1 (2026-09-27)
- Author:
- Andrey Santrosyan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe addressing of a provider in the record: the endpoint family its wire ids are spelled for.static final StringThe platform of a provider in the record, and of an entry.static final StringThe catalog's record of the providers it was written for: provider key to{"platform": ..., "addressing": ...}. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringrecordedAddressing(com.fasterxml.jackson.databind.JsonNode entry, String providerKey, com.fasterxml.jackson.databind.JsonNode record) The addressing an entry's wire id is spelled for: the record's word for its provider, else its platform, the default addressing of every provider; null when not even the platform is known.recordedKeys(com.fasterxml.jackson.databind.JsonNode record) The provider keys a catalog records, or null when it records none.static StringrecordedPlatform(com.fasterxml.jackson.databind.JsonNode entry, String providerKey, com.fasterxml.jackson.databind.JsonNode record) The platform an entry was written on: its own word, else the record's for its provider; null when neither says.static ClientProvider<?> resolve(Map<String, ClientProvider<?>> providers, String addressing, ModelKind kind, String wireModelId) The provider of an addressing to link an entry to, among the given ones, or null when none fits: of the providers of that addressing and kind, the first in key order that claims the wire id, else the first that serves it.static voidstamp(com.fasterxml.jackson.databind.node.ObjectNode catalog, Map<String, ClientProvider<?>> providers) Records in a catalog the providers it is written for, and stamps each entry with its provider's platform.
-
Field Details
-
PROVIDERS
The catalog's record of the providers it was written for: provider key to{"platform": ..., "addressing": ...}.- See Also:
-
PLATFORM
The platform of a provider in the record, and of an entry.- See Also:
-
ADDRESSING
The addressing of a provider in the record: the endpoint family its wire ids are spelled for.- See Also:
-
-
Method Details
-
stamp
public static void stamp(com.fasterxml.jackson.databind.node.ObjectNode catalog, Map<String, ClientProvider<?>> providers) Records in a catalog the providers it is written for, and stamps each entry with its provider's platform. The record names every provider given, and every provider an entry names that is not given but whose platform is known, from the entry itself or from the record the catalog already carries: a catalog keeps entries of a provider the writing process does not have, and says what they are. Such a provider's addressing is the carried record's word, else its platform. -
recordedPlatform
-
recordedAddressing
public static String recordedAddressing(com.fasterxml.jackson.databind.JsonNode entry, String providerKey, com.fasterxml.jackson.databind.JsonNode record) The addressing an entry's wire id is spelled for: the record's word for its provider, else its platform, the default addressing of every provider; null when not even the platform is known. -
recordedKeys
-
resolve
public static ClientProvider<?> resolve(Map<String, ClientProvider<?>> providers, String addressing, ModelKind kind, String wireModelId) The provider of an addressing to link an entry to, among the given ones, or null when none fits: of the providers of that addressing and kind, the first in key order that claims the wire id, else the first that serves it. The first hit wins; two providers claiming the same model is a conflict between the artifacts that ship them, settled here by key order so every run links the same way.
-