Class PublicRepositoryTransport
java.lang.Object
zeroecho.pki.server.http.PublicRepositoryTransport
- All Implemented Interfaces:
AutoCloseable
Lifecycle owner for the isolated, optionally enabled public repository listener.
-
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the actual public listener address.voidclose()voidquiesce()Prevents new public stream admission.voidStops the listener and its independent bounded resources.static PublicRepositoryTransportstart(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.
-
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 configurationrealm- shared lifecycle-owned realmauthenticator- public-listener authenticatorclock- authoritative protocol clockrandom- cryptographically secure request-identifier entropyloader- provider service class loaderready- readiness predicate checked by request handlers- Returns:
- started public-listener lifecycle owner
- Throws:
IllegalStateException- if the listener cannot be initialized
-
address
Returns the actual public listener address.- Returns:
- bound listener address
-
quiesce
public void quiesce()Prevents new public stream admission. -
shutdown
Stops the listener and its independent bounded resources.- Parameters:
graceful- maximum transport drain duration; whole seconds are passed to the listener- Throws:
NullPointerException- ifgracefulisnull
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-