Class PublicRepositoryTransport

java.lang.Object
zeroecho.pki.server.http.PublicRepositoryTransport
All Implemented Interfaces:
AutoCloseable

public final class PublicRepositoryTransport extends Object implements AutoCloseable
Lifecycle owner for the isolated, optionally enabled public repository listener.
  • Method Details

    • start

      public static PublicRepositoryTransport start(PkiServerConfiguration.PublicListener configuration, ServerRealmContext realm, AdministrativeAuthenticator authenticator, Clock clock, SecureRandom random, ClassLoader loader, BooleanSupplier ready)
      Starts one separately bounded public listener over the shared realm.
      Parameters:
      configuration - validated public-listener configuration
      realm - shared lifecycle-owned realm
      authenticator - public-listener authenticator
      clock - authoritative protocol clock
      random - cryptographically secure request-identifier entropy
      loader - provider service class loader
      ready - readiness predicate checked by request handlers
      Returns:
      started public-listener lifecycle owner
      Throws:
      IllegalStateException - if the listener cannot be initialized
    • address

      public InetSocketAddress address()
      Returns the actual public listener address.
      Returns:
      bound listener address
    • quiesce

      public void quiesce()
      Prevents new public stream admission.
    • shutdown

      public void shutdown(Duration graceful)
      Stops the listener and its independent bounded resources.
      Parameters:
      graceful - maximum transport drain duration; whole seconds are passed to the listener
      Throws:
      NullPointerException - if graceful is null
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable