public static class HttpServerConfiguration.Builder extends Object
HttpServerConfiguration
s. At the very least, a host, a port and a name must be provided.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpServerConfiguration |
build() |
HttpServerConfiguration.Builder |
setConnectionIdleTimeout(int connectionIdleTimeout)
Defines the number of milliseconds that a connection can remain idle before being closed.
|
HttpServerConfiguration.Builder |
setHost(String host)
Defines the host where the requests will be sent to the
HttpServer . |
HttpServerConfiguration.Builder |
setName(String name) |
HttpServerConfiguration.Builder |
setPort(int port)
Defines the port where the requests will be received by the
HttpServer . |
HttpServerConfiguration.Builder |
setSchedulerSupplier(Supplier<Scheduler> schedulerSupplier)
|
HttpServerConfiguration.Builder |
setTlsContextFactory(TlsContextFactory tlsContextFactory)
Required exclusively for HTTPS, this defines through a
TlsContextFactory all the TLS related data to establish
such connections. |
HttpServerConfiguration.Builder |
setUsePersistentConnections(boolean usePersistentConnections)
Defines if connections should be kept after a request is completed or closed.
|
public HttpServerConfiguration.Builder setHost(String host)
HttpServer
. Must be provided.host
- where to establish the serverpublic HttpServerConfiguration.Builder setPort(int port)
HttpServer
. Must be provided.port
- where to listenpublic HttpServerConfiguration.Builder setTlsContextFactory(TlsContextFactory tlsContextFactory)
TlsContextFactory
all the TLS related data to establish
such connections. Set to null
by default.tlsContextFactory
- a TlsContextFactory
with the required data.public HttpServerConfiguration.Builder setUsePersistentConnections(boolean usePersistentConnections)
true
.usePersistentConnections
- boolean
specifying the decisionpublic HttpServerConfiguration.Builder setConnectionIdleTimeout(int connectionIdleTimeout)
connectionIdleTimeout
- timeout value (in milliseconds)public HttpServerConfiguration.Builder setSchedulerSupplier(Supplier<Scheduler> schedulerSupplier)
Supplier
for a Scheduler
that will be used by the HttpServer
to process requests. Must be
specified if the server won't be associated to a flow where a processing strategy will define the scheduling.schedulerSupplier
- public HttpServerConfiguration.Builder setName(String name)
public HttpServerConfiguration build()
HttpServerConfiguration
as specified.Copyright © 2018. All rights reserved.