public interface ServerConfiguration extends SocketConfiguration
| Modifier and Type | Interface and Description |
|---|---|
static class |
ServerConfiguration.Builder
A
ServerConfiguration builder. |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SOCKET_NAME
The default server socket configuration name.
|
DEFAULT, DEFAULT_BACKLOG_SIZE| Modifier and Type | Method and Description |
|---|---|
int |
backlog()
Returns a maximum length of the queue of incoming connections on the default server
socket.
|
InetAddress |
bindAddress()
Returns local address where the server listens on with the default server socket.
|
static ServerConfiguration.Builder |
builder()
Creates new instance of a
server configuration builder. |
static ServerConfiguration.Builder |
builder(Config config)
Creates new instance of a
server configuration builder with defaults from external configuration source. |
static ServerConfiguration |
create(Config config)
Creates new instance with defaults from external configuration source.
|
ExperimentalConfiguration |
experimental()
Returns an
ExperimentalConfiguration. |
int |
port()
Returns a server port to listen on with the default server socket.
|
int |
receiveBufferSize()
Returns proposed value of the TCP receive window that is advertised to the remote peer on the
default server socket.
|
default SocketConfiguration |
socket(String name)
A socket configuration of an additional named server socket.
|
Map<String,SocketConfiguration> |
sockets()
A map of all the configured server sockets; that is the default server socket
which is identified by the key
DEFAULT_SOCKET_NAME and also all the additional
named server socket configurations. |
SSLContext |
ssl()
Returns a
SSLContext to use with the default server socket. |
int |
timeoutMillis()
Returns a default server socket timeout in milliseconds or
0 for an infinite timeout. |
Tracer |
tracer()
Returns an opentracing.io tracer.
|
int |
workersCount()
Returns a count of threads in s pool used to tryProcess HTTP requests.
|
static final String DEFAULT_SOCKET_NAME
port() or backlog()) is accessible through
socket(String) or sockets() with this
default socket name.int workersCount()
Default value is CPU_COUNT * 2.
int port()
0 then any available ephemeral port will be used.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
port in interface SocketConfigurationInetAddress bindAddress()
null then listens an all local addresses.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
bindAddress in interface SocketConfigurationnull for all local addressesint backlog()
Default value is SocketConfiguration.DEFAULT_BACKLOG_SIZE.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
backlog in interface SocketConfigurationint timeoutMillis()
0 for an infinite timeout.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
timeoutMillis in interface SocketConfiguration0int receiveBufferSize()
If 0 then use implementation default.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
receiveBufferSize in interface SocketConfiguration0SSLContext ssl()
SSLContext to use with the default server socket. If not null then
the server enforces an SSL communication.
Additional named server socket configuration is accessible through
the socket(String) and sockets() methods.
ssl in interface SocketConfigurationdefault SocketConfiguration socket(String name)
An additional named server socket may have a dedicated Routing configured
through WebServer.Builder.addNamedRouting(String, Routing).
name - the name of the additional server socketnull if there is no such
named server socketMap<String,SocketConfiguration> sockets()
DEFAULT_SOCKET_NAME and also all the additional
named server socket configurations.
An additional named server socket may have a dedicated Routing configured
through WebServer.Builder.addNamedRouting(String, Routing).
Tracer tracer()
GlobalTracer.null (defaulting to GlobalTracerExperimentalConfiguration experimental()
ExperimentalConfiguration.static ServerConfiguration create(Config config)
config - the externalized configurationstatic ServerConfiguration.Builder builder()
server configuration builder.builder in interface SocketConfigurationstatic ServerConfiguration.Builder builder(Config config)
server configuration builder with defaults from external configuration source.config - the externalized configurationCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.