Class BootstrapRegistryServer

java.lang.Object
org.j7m.middleware.registry.bootstrap.BootstrapRegistryServer
All Implemented Interfaces:
AutoCloseable

public final class BootstrapRegistryServer extends Object implements AutoCloseable
Explicit read-only mTLS bootstrap registry endpoint. All client certificates trusted by the supplied TLS context may read only the configured registry contexts; use a dedicated bootstrap trust store. There are sixteen concurrent connections, no worker queue and at most 128 admitted connections per second. Requests and responses are bounded to 256 KiB. Record payloads retain the existing smaller multicast field-codec limits. The backend is borrowed and must return promptly; close terminates sockets but cannot forcibly terminate a blocked backend implementation.
  • Constructor Details

    • BootstrapRegistryServer

      public BootstrapRegistryServer(InetSocketAddress bind, SSLContext tls, org.j7m.middleware.registry.api.RegistryClient registry, Set<String> contexts, Duration requestBudget) throws IOException
      Starts an explicit host-owned registry endpoint; no runtime default installs it.
      Parameters:
      bind - bind address, with port zero allowed for OS allocation
      tls - nonnull host TLS context with server identity and trusted client certificates
      registry - borrowed local registry; do not supply a recursive network bootstrap wrapper
      contexts - nonempty finite allowlist of contexts readable by authenticated clients
      requestBudget - total handshake/request/backend/write budget, 1ms through 5s
      Throws:
      IOException - if binding fails
      IllegalArgumentException - for invalid limits or contexts
  • Method Details

    • address

      public InetSocketAddress address()
      Returns the actual listening address.
      Returns:
      bound address, including the OS-selected port
    • close

      public void close()
      Stops accepting requests and closes active sockets and owned workers. The borrowed registry remains open. Running backend calls receive interruption, which is advisory.
      Specified by:
      close in interface AutoCloseable