Class SchemaIndexes

java.lang.Object
org.j7m.middleware.codec.api.SchemaIndexes

public final class SchemaIndexes extends Object
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 Details

    • registry

      public static SchemaRegistry registry(Collection<? extends SchemaIndex> indexes)
      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 input
      NullPointerException - on null input or member
    • load

      public static SchemaRegistry load(ModuleLayer layer)
      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 formats
      ServiceConfigurationError - on invalid provider configuration