public static final class HttpServer.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
HttpServer.Builder |
bindAddress(java.lang.String bindAddress)
The address to listen for (e.g.
|
HttpServer |
build() |
HttpServer.Builder |
listenAddress(java.net.InetSocketAddress listenAddress)
The
InetSocketAddress to listen on. |
HttpServer.Builder |
options(java.util.function.Consumer<? super HttpServerOptions.Builder> options)
The options for the server, including bind address and port.
|
HttpServer.Builder |
port(int port)
The port to listen to, or 0 to dynamically attribute one.
|
public final HttpServer.Builder bindAddress(java.lang.String bindAddress)
bindAddress - address to listen for (e.g. 0.0.0.0 or 127.0.0.1)thispublic final HttpServer.Builder listenAddress(java.net.InetSocketAddress listenAddress)
InetSocketAddress to listen on.listenAddress - the listen addressthispublic final HttpServer.Builder port(int port)
port - the port to listen to, or 0 to dynamically attribute one.thispublic final HttpServer.Builder options(java.util.function.Consumer<? super HttpServerOptions.Builder> options)
options - the options for the server, including bind address and port.thispublic HttpServer build()