Class PkiServerConfigurationCodec

java.lang.Object
zeroecho.pki.server.PkiServerConfigurationCodec

public final class PkiServerConfigurationCodec extends Object
Strict current-version server configuration decoder with closed field sets.
  • Field Details

    • MAXIMUM_CONFIGURATION_BYTES

      public static final int MAXIMUM_CONFIGURATION_BYTES
      Maximum server configuration document size.
      See Also:
  • Method Details

    • read

      public static PkiServerConfiguration read(Path path) throws IOException
      Reads and validates one exact configuration without opening providers, stores, listeners, audit sinks, or sessions.
      Parameters:
      path - configuration path
      Returns:
      immutable validated configuration
      Throws:
      IOException - when the bounded file cannot be read
      IllegalArgumentException - when framing or semantics are invalid
    • decode

      public static PkiServerConfiguration decode(byte[] document)
      Decodes one bounded strict configuration document.
      Parameters:
      document - encoded configuration, bounded by MAXIMUM_CONFIGURATION_BYTES
      Returns:
      immutable validated server configuration
      Throws:
      IllegalArgumentException - if framing, schema version, or semantics are invalid