Class HTTPServer.Builder
Object
Builder
- Enclosing class:
- HTTPServer
-
Method Summary
Modifier and TypeMethodDescriptionauthenticatedSubjectAttributeName
(String authenticatedSubjectAttributeName) Optional: the attribute name of a Subject from a custom authenticator.authenticator
(Authenticator authenticator) Optional:Authenticator
for authentication.Build and start the HTTPServer.defaultHandler
(HttpHandler defaultHandler) Optional: Override default handler, i.e. the handler that will be registered for the / endpoint.executorService
(ExecutorService executorService) Optional: ExecutorService used by thehttpServer
.Use this hostname to resolve the IP address to bind to.httpsConfigurator
(HttpsConfigurator configurator) Optional:HttpsConfigurator
for TLS/SSLinetAddress
(InetAddress address) Bind to this IP address.port
(int port) Port to bind to.registry
(PrometheusRegistry registry) Optional: Default isPrometheusRegistry.defaultRegistry
.
-
Method Details
-
port
Port to bind to. Default is 0, indicating that a random port will be selected. You can learn the randomly selected port by callingHTTPServer.getPort()
. -
hostname
Use this hostname to resolve the IP address to bind to. Must not be called together withinetAddress(InetAddress)
. Default is empty, indicating that the HTTPServer binds to the wildcard address. -
inetAddress
Bind to this IP address. Must not be called together withhostname(String)
. Default is empty, indicating that the HTTPServer binds to the wildcard address. -
executorService
Optional: ExecutorService used by thehttpServer
. -
registry
Optional: Default isPrometheusRegistry.defaultRegistry
. -
authenticator
Optional:Authenticator
for authentication. -
authenticatedSubjectAttributeName
public HTTPServer.Builder authenticatedSubjectAttributeName(String authenticatedSubjectAttributeName) Optional: the attribute name of a Subject from a custom authenticator. -
httpsConfigurator
Optional:HttpsConfigurator
for TLS/SSL -
defaultHandler
Optional: Override default handler, i.e. the handler that will be registered for the / endpoint. -
buildAndStart
Build and start the HTTPServer.- Throws:
IOException
-