Class SchemaIndexes
java.lang.Object
org.j7m.middleware.codec.api.SchemaIndexes
Explicit trusted index assembly; validates all descriptors before any value factory is invoked.
Does not discover classes from wire names. Provider discovery executes trusted provider code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaRegistryload(ModuleLayer layer) Loads providers from an explicitly trusted module layer; no global opens are needed.static SchemaRegistryregistry(Collection<? extends SchemaIndex> indexes) Builds a bounded immutable allowlist and validates versions, duplicates and compatibility.
-
Method Details
-
registry
Builds a bounded immutable allowlist and validates versions, duplicates and compatibility.- Parameters:
indexes- explicit trusted providers, at most 256- Returns:
- validated registry containing at most 4096 schemas
- Throws:
IllegalArgumentException- on unsupported format, duplicate, incompatible or oversized inputNullPointerException- on null input or member
-
load
Loads providers from an explicitly trusted module layer; no global opens are needed.- Parameters:
layer- trusted module layer, never null- Returns:
- validated allowlist
- Throws:
IllegalArgumentException- on invalid descriptors or unsupported index formatsServiceConfigurationError- on invalid provider configuration
-