Class PkiHttpsTransport
java.lang.Object
zeroecho.pki.server.http.PkiHttpsTransport
- All Implemented Interfaces:
AutoCloseable
Narrow lifecycle facade hiding the JDK HTTPS listener and bounded execution runtime.
The public server lifecycle uses this type only as an internal module boundary; request handlers, queues, permits and provider discovery remain package-private.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether operation admission is accepting new requests.address()Returns the actual bound listener address, including an allocated ephemeral port.voidclose()static booleanReports the implementation-owned worker marker used to prevent lifecycle self-waits.voidquiesce()Prevents new operation admission without closing in-flight work.static SSLContextresolveTls(PkiServerConfiguration configuration, ClassLoader loader) Resolves the explicitly selected TLS provider before realm resources are opened.voidStops new exchanges, grants admitted exchanges a finite drain period and then closes all bounded executors.shutdownHook(Runnable task) Creates the sole process-shutdown thread through the centralized runtime.static PkiHttpsTransportstart(PkiServerConfiguration configuration, ServerRealmContext realm, PkiServerAuthenticator authenticator, Clock clock, SecureRandom random, ClassLoader loader, BooleanSupplier ready) Opens and starts one strictly mutual-TLS listener.static PkiHttpsTransportstartResolved(PkiServerConfiguration configuration, ServerRealmContext realm, PkiServerAuthenticator authenticator, Clock clock, SecureRandom random, SSLContext tls, BooleanSupplier ready) Starts a listener using a TLS context resolved before realm construction.
-
Method Details
-
start
public static PkiHttpsTransport start(PkiServerConfiguration configuration, ServerRealmContext realm, PkiServerAuthenticator authenticator, Clock clock, SecureRandom random, ClassLoader loader, BooleanSupplier ready) Opens and starts one strictly mutual-TLS listener.- Parameters:
configuration- validated server configurationrealm- shared long-lived realmauthenticator- initialized mTLS authenticatorclock- request-time sourcerandom- correlation identifier sourceloader- explicitly scoped TLS-provider loaderready- readiness predicate owned by the server lifecycle- Returns:
- started bounded transport
-
resolveTls
Resolves the explicitly selected TLS provider before realm resources are opened.- Parameters:
configuration- validated server configurationloader- explicitly scoped provider loader- Returns:
- initialized JSSE context without exposing private-key material
-
startResolved
public static PkiHttpsTransport startResolved(PkiServerConfiguration configuration, ServerRealmContext realm, PkiServerAuthenticator authenticator, Clock clock, SecureRandom random, SSLContext tls, BooleanSupplier ready) Starts a listener using a TLS context resolved before realm construction.- Parameters:
configuration- validated server configurationrealm- shared long-lived realmauthenticator- initialized mTLS authenticatorclock- request-time sourcerandom- correlation identifier sourcetls- initialized TLS contextready- readiness predicate- Returns:
- started bounded transport
-
address
Returns the actual bound listener address, including an allocated ephemeral port.- Returns:
- bound administrative listener address
-
accepting
public boolean accepting()Indicates whether operation admission is accepting new requests.- Returns:
truewhile new requests may be admitted
-
currentThreadIsServerWorker
public static boolean currentThreadIsServerWorker()Reports the implementation-owned worker marker used to prevent lifecycle self-waits. This is not an application scheduling or authorization signal.- Returns:
- whether the current thread is owned by a packaged server runtime
-
quiesce
public void quiesce()Prevents new operation admission without closing in-flight work. -
shutdownHook
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
Stops new exchanges, grants admitted exchanges a finite drain period and then closes all bounded executors.- Parameters:
graceful- finite listener drain period
-