| Modifier and Type | Method and Description |
|---|---|
WebServer.Builder |
addNamedRouting(String name,
Routing routing)
Associates a dedicated routing with an additional server socket configuration.
|
WebServer.Builder |
addNamedRouting(String name,
Supplier<Routing> routingBuilder)
Associates a dedicated routing with an additional server socket configuration.
|
WebServer |
build()
Builds the
WebServer instance as configured by this builder and its parameters. |
WebServer.Builder |
config(ServerConfiguration configuration)
Set a configuration of the
WebServer. |
WebServer.Builder |
config(Supplier<ServerConfiguration> configurationBuilder)
Set a configuration of the
WebServer. |
public WebServer.Builder config(ServerConfiguration configuration)
WebServer.configuration - the configurationpublic WebServer.Builder config(Supplier<ServerConfiguration> configurationBuilder)
WebServer.configurationBuilder - the configuration builderpublic WebServer.Builder addNamedRouting(String name, Routing routing)
The additional server socket configuration must be set as per
ServerConfiguration.Builder.addSocket(String, SocketConfiguration). If there is no such
named server socket configuration, a IllegalStateException is thrown by the
build() method.
name - the named server socket configuration to associate the provided routing withrouting - the routing to associate with the provided name of a named server socket
configurationpublic WebServer.Builder addNamedRouting(String name, Supplier<Routing> routingBuilder)
The additional server socket configuration must be set as per
ServerConfiguration.Builder.addSocket(String, SocketConfiguration). If there is no such
named server socket configuration, a IllegalStateException is thrown by the
build() method.
name - the named server socket configuration to associate the provided routing withroutingBuilder - the routing builder to associate with the provided name of a named server socket
configuration; will be built as a first step of this method executionpublic WebServer build()
WebServer instance as configured by this builder and its parameters.build in interface Builder<WebServer>WebServerIllegalStateException - if there are unpaired named routings (as described
at addNamedRouting(String, Routing))Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.