public static class HttpServer2.Builder
extends java.lang.Object
| Constructor | Description |
|---|---|
Builder() |
| Modifier and Type | Method | Description |
|---|---|---|
HttpServer2.Builder |
addEndpoint(java.net.URI endpoint) |
Add an endpoint that the HTTP server should listen to.
|
HttpServer2 |
build() |
|
HttpServer2.Builder |
configureXFrame(boolean xFrameEnabled) |
Adds the ability to control X_FRAME_OPTIONS on HttpServer2.
|
HttpServer2.Builder |
disallowFallbackToRandomSingerSecretProvider(boolean value) |
|
HttpServer2.Builder |
excludeCiphers(java.lang.String pExcludeCiphers) |
|
HttpServer2.Builder |
hostName(java.lang.String hostName) |
Set the hostname of the http server.
|
HttpServer2.Builder |
includeCiphers(java.lang.String pIncludeCiphers) |
|
HttpServer2.Builder |
keyPassword(java.lang.String password) |
|
HttpServer2.Builder |
keyStore(java.lang.String location,
java.lang.String password,
java.lang.String type) |
|
HttpServer2.Builder |
needsClientAuth(boolean value) |
Specify whether the server should authorize the client in SSL
connections.
|
HttpServer2.Builder |
setACL(AccessControlList acl) |
|
HttpServer2.Builder |
setAuthFilterConfigurationPrefix(java.lang.String value) |
|
HttpServer2.Builder |
setAuthFilterConfigurationPrefixes(java.lang.String[] prefixes) |
|
HttpServer2.Builder |
setConf(Configuration conf) |
|
HttpServer2.Builder |
setFindPort(boolean findPort) |
|
HttpServer2.Builder |
setKeytabConfKey(java.lang.String keytabConfKey) |
|
HttpServer2.Builder |
setName(java.lang.String name) |
|
HttpServer2.Builder |
setPathSpec(java.lang.String[] pathSpec) |
|
HttpServer2.Builder |
setPortRanges(Configuration.IntegerRanges ranges) |
|
HttpServer2.Builder |
setSecurityEnabled(boolean securityEnabled) |
|
HttpServer2.Builder |
setSniHostCheckEnabled(boolean sniHostCheckEnabled) |
Enable or disable sniHostCheck.
|
HttpServer2.Builder |
setSSLConf(Configuration sslCnf) |
Specify the SSL configuration to load.
|
HttpServer2.Builder |
setUsernameConfKey(java.lang.String usernameConfKey) |
|
HttpServer2.Builder |
setXFrameOption(java.lang.String option) |
Sets a valid X-Frame-option that can be used by HttpServer2.
|
HttpServer2.Builder |
trustStore(java.lang.String location,
java.lang.String password,
java.lang.String type) |
public HttpServer2.Builder setName(java.lang.String name)
public HttpServer2.Builder addEndpoint(java.net.URI endpoint)
endpoint - the endpoint of that the HTTP server should listen to. The
scheme specifies the protocol (i.e. HTTP / HTTPS), the host
specifies the binding address, and the port specifies the
listening port. Unspecified or zero port means that the server
can listen to any port.public HttpServer2.Builder hostName(java.lang.String hostName)
hostName - hostName.public HttpServer2.Builder trustStore(java.lang.String location, java.lang.String password, java.lang.String type)
public HttpServer2.Builder keyStore(java.lang.String location, java.lang.String password, java.lang.String type)
public HttpServer2.Builder keyPassword(java.lang.String password)
public HttpServer2.Builder needsClientAuth(boolean value)
value - value.public HttpServer2.Builder setFindPort(boolean findPort)
public HttpServer2.Builder setPortRanges(Configuration.IntegerRanges ranges)
public HttpServer2.Builder setConf(Configuration conf)
public HttpServer2.Builder setSSLConf(Configuration sslCnf)
sslCnf - sslCnf.public HttpServer2.Builder setPathSpec(java.lang.String[] pathSpec)
public HttpServer2.Builder setACL(AccessControlList acl)
public HttpServer2.Builder setSecurityEnabled(boolean securityEnabled)
public HttpServer2.Builder setUsernameConfKey(java.lang.String usernameConfKey)
public HttpServer2.Builder setKeytabConfKey(java.lang.String keytabConfKey)
public HttpServer2.Builder disallowFallbackToRandomSingerSecretProvider(boolean value)
public HttpServer2.Builder setAuthFilterConfigurationPrefix(java.lang.String value)
public HttpServer2.Builder setAuthFilterConfigurationPrefixes(java.lang.String[] prefixes)
public HttpServer2.Builder excludeCiphers(java.lang.String pExcludeCiphers)
public HttpServer2.Builder includeCiphers(java.lang.String pIncludeCiphers)
public HttpServer2.Builder configureXFrame(boolean xFrameEnabled)
xFrameEnabled - - True enables X_FRAME_OPTIONS false disables it.public HttpServer2.Builder setXFrameOption(java.lang.String option)
option - - String DENY, SAMEORIGIN or ALLOW-FROM are the only valid
options. Any other value will throw IllegalArgument
Exception.public HttpServer2.Builder setSniHostCheckEnabled(boolean sniHostCheckEnabled)
sniHostCheckEnabled - Enable sniHostCheck if true, else disable it.public HttpServer2 build() throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.