- java.lang.Object
-
- io.helidon.webserver.ServerConfiguration.Builder
-
- All Implemented Interfaces:
Builder<ServerConfiguration>
,SocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
,Supplier<ServerConfiguration>
- Enclosing interface:
- ServerConfiguration
@Deprecated public static final class ServerConfiguration.Builder extends Object implements SocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>, Builder<ServerConfiguration>
Deprecated.since 2.0.0 - useWebServer.Builder
insteadAServerConfiguration
builder.
-
-
Field Summary
-
Fields inherited from interface io.helidon.webserver.SocketConfiguration.SocketConfigurationBuilder
REQUESTED_URI_DISCOVERY_CONFIG_KEY_PREFIX
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ServerConfiguration.Builder
addRequestedUriDiscoveryType(SocketConfiguration.RequestedUriDiscoveryType type)
Deprecated.Adds a type of front-end URI discovery Helidon should use for this socket.ServerConfiguration.Builder
addSocket(String name, int port, InetAddress bindAddress)
Deprecated.since 2.0.0, please useaddSocket(String, SocketConfiguration)
insteadServerConfiguration.Builder
addSocket(String name, SocketConfiguration socketConfiguration)
Deprecated.Adds an additional named server socket configuration.ServerConfiguration.Builder
addSocket(String name, Supplier<SocketConfiguration> socketConfigurationBuilder)
Deprecated.Adds an additional named server socket configuration builder.ServerConfiguration.Builder
backlog(int size)
Deprecated.Sets a maximum length of the queue of incoming connections.ServerConfiguration.Builder
backpressureBufferSize(long size)
Deprecated.Maximum length of the response data sending buffer can keep without flushing.ServerConfiguration.Builder
backpressureStrategy(BackpressureStrategy backpressureStrategy)
Deprecated.Sets a backpressure strategy for the server to apply against user provided response upstream.ServerConfiguration.Builder
bindAddress(InetAddress bindAddress)
Deprecated.Sets a local address for server to bind.ServerConfiguration
build()
Deprecated.Builds a new configuration instance.ServerConfiguration.Builder
config(Config config)
Deprecated.Sets configuration values included in providedConfig
parameter.ServerConfiguration.Builder
connectionIdleTimeout(int seconds)
Deprecated.Sets the number of seconds after which an idle connection will be automatically closed by the server.ServerConfiguration.Builder
context(Context context)
Deprecated.Configure the application scoped context to be used as a parent for webserver request contexts.ServerConfiguration.Builder
continueImmediately(boolean continueImmediately)
Deprecated.When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.ServerConfiguration.Builder
enableCompression(boolean value)
Deprecated.Enable negotiation for gzip/deflate content encodings.ServerConfiguration.Builder
enabledSSlProtocols(String... protocols)
Deprecated.Configures the SSL protocols to enable with the default server socket.ServerConfiguration.Builder
enabledSSlProtocols(List<String> protocols)
Deprecated.Configures the SSL protocols to enable with the default server socket.ServerConfiguration.Builder
experimental(ExperimentalConfiguration experimental)
Deprecated.Configure experimental features.ServerConfiguration.Builder
maxHeaderSize(int size)
Deprecated.Maximal number of bytes of all header values combined.ServerConfiguration.Builder
maxInitialLineLength(int length)
Deprecated.Maximal number of characters in the initial HTTP line.ServerConfiguration.Builder
maxPayloadSize(long size)
Deprecated.Configure maximum client payload size.ServerConfiguration.Builder
maxShutdownTimeout(Duration maxShutdownTimeout)
Deprecated.Configure the maximum amount of time that the server will wait to shut down regardless of the value of any additionally requested quiet period.ServerConfiguration.Builder
port(int port)
Deprecated.Sets server port.ServerConfiguration.Builder
printFeatureDetails(boolean print)
Deprecated.Set totrue
to print detailed feature information on startup.ServerConfiguration.Builder
receiveBufferSize(int bytes)
Deprecated.Propose value of the TCP receive window that is advertised to the remote peer.ServerConfiguration.Builder
requestedUriDiscoveryEnabled(boolean enabled)
Deprecated.Sets whether requested URI discovery is enabled for the socket.ServerConfiguration.Builder
requestedUriDiscoveryTypes(List<SocketConfiguration.RequestedUriDiscoveryType> types)
Deprecated.Assigns the front-end URI discovery type(s) this socket should use.ServerConfiguration.Builder
shutdownQuietPeriod(Duration shutdownQuietPeriod)
Deprecated.Configure the quiet period during which the webserver will wait for new incoming connections after it has been told to shut down.ServerConfiguration.Builder
ssl(Supplier<? extends SSLContext> sslContextBuilder)
Deprecated.SetsSSLContext
to to use with the server.ServerConfiguration.Builder
ssl(SSLContext sslContext)
Deprecated.SetsSSLContext
to to use with the server.ServerConfiguration.Builder
timeout(int milliseconds)
Deprecated.Sets a socket timeout in milliseconds or0
for infinite timeout.ServerConfiguration.Builder
timeout(long amount, TimeUnit unit)
Deprecated.Configures a server socket timeout.ServerConfiguration.Builder
tls(WebServerTls webServerTls)
Deprecated.Configures SSL for this socket.ServerConfiguration.Builder
tracer(Tracer tracer)
Deprecated.Sets an opentracing.io tracer.ServerConfiguration.Builder
tracer(Supplier<? extends Tracer> tracerBuilder)
Deprecated.Sets an opentracing.io tracer.ServerConfiguration.Builder
transport(Transport transport)
Deprecated.Configure transport.ServerConfiguration.Builder
trustedProxies(AllowList trustedProxies)
Deprecated.Assigns the settings governing the acceptance and rejection of forwarded headers from incoming requests to this socket.ServerConfiguration.Builder
workersCount(int workers)
Deprecated.Sets a count of threads in pool used to process HTTP requests.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.webserver.SocketConfiguration.SocketConfigurationBuilder
bindAddress, host, tls
-
-
-
-
Method Detail
-
ssl
public ServerConfiguration.Builder ssl(SSLContext sslContext)
Deprecated.SetsSSLContext
to to use with the server. If notnull
then server enforce SSL communication.- Parameters:
sslContext
- ssl context- Returns:
- an updated builder
-
ssl
public ServerConfiguration.Builder ssl(Supplier<? extends SSLContext> sslContextBuilder)
Deprecated.SetsSSLContext
to to use with the server. If notnull
then server enforce SSL communication.- Parameters:
sslContextBuilder
- ssl context builder; will be built as a first step of this method execution- Returns:
- an updated builder
-
port
public ServerConfiguration.Builder port(int port)
Deprecated.Sets server port. If port is0
or less then any available ephemeral port will be used.Configuration key:
port
- Specified by:
port
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
port
- the server port- Returns:
- an updated builder
-
bindAddress
public ServerConfiguration.Builder bindAddress(InetAddress bindAddress)
Deprecated.Sets a local address for server to bind. Ifnull
then listens an all local addresses.Configuration key:
bind-address
- Specified by:
bindAddress
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
bindAddress
- the address to bind the server ornull
for all local addresses- Returns:
- an updated builder
-
backlog
public ServerConfiguration.Builder backlog(int size)
Deprecated.Sets a maximum length of the queue of incoming connections. Default value is1024
.Configuration key:
backlog
- Specified by:
backlog
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- the maximum length of the queue of incoming connections- Returns:
- an updated builder
-
timeout
public ServerConfiguration.Builder timeout(int milliseconds)
Deprecated.Sets a socket timeout in milliseconds or0
for infinite timeout.Configuration key:
timeout
- Parameters:
milliseconds
- a socket timeout in milliseconds or0
- Returns:
- an updated builder
-
receiveBufferSize
public ServerConfiguration.Builder receiveBufferSize(int bytes)
Deprecated.Propose value of the TCP receive window that is advertised to the remote peer. If0
then implementation default is used.Configuration key:
receive-buffer
- Specified by:
receiveBufferSize
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
bytes
- a buffer size in bytes or0
- Returns:
- an updated builder
-
maxHeaderSize
public ServerConfiguration.Builder maxHeaderSize(int size)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Maximal number of bytes of all header values combined. When a bigger value is received, aHttp.Status.BAD_REQUEST_400
is returned.Default is
16384
- Specified by:
maxHeaderSize
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- maximal number of bytes of combined header values- Returns:
- this builder
-
maxInitialLineLength
public ServerConfiguration.Builder maxInitialLineLength(int length)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Maximal number of characters in the initial HTTP line.Default is
4096
- Specified by:
maxInitialLineLength
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
length
- maximal number of characters- Returns:
- this builder
-
addSocket
@Deprecated public ServerConfiguration.Builder addSocket(String name, int port, InetAddress bindAddress)
Deprecated.since 2.0.0, please useaddSocket(String, SocketConfiguration)
insteadAdds an additional named server socket configuration. As a result, the server will listen on multiple ports.An additional named server socket may have a dedicated
Routing
configured throughWebServer.Builder.addNamedRouting(String, Routing)
.- Parameters:
name
- the name of the additional server socket configurationport
- the port to bind; if0
or less, any available ephemeral port will be usedbindAddress
- the address to bind; ifnull
, all local addresses will be bound- Returns:
- an updated builder
-
addSocket
public ServerConfiguration.Builder addSocket(String name, SocketConfiguration socketConfiguration)
Deprecated.Adds an additional named server socket configuration. As a result, the server will listen on multiple ports.An additional named server socket may have a dedicated
Routing
configured throughWebServer.Builder.addNamedRouting(String, Routing)
.- Parameters:
name
- the name of the additional server socket configurationsocketConfiguration
- the additional named server socket configuration- Returns:
- an updated builder
-
addSocket
public ServerConfiguration.Builder addSocket(String name, Supplier<SocketConfiguration> socketConfigurationBuilder)
Deprecated.Adds an additional named server socket configuration builder. As a result, the server will listen on multiple ports.An additional named server socket may have a dedicated
Routing
configured throughWebServer.Builder.addNamedRouting(String, Routing)
.- Parameters:
name
- the name of the additional server socket configurationsocketConfigurationBuilder
- the additional named server socket configuration builder; will be built as a first step of this method execution- Returns:
- an updated builder
-
workersCount
public ServerConfiguration.Builder workersCount(int workers)
Deprecated.Sets a count of threads in pool used to process HTTP requests. Default value isCPU_COUNT * 2
.Configuration key:
workers
- Parameters:
workers
- a workers count- Returns:
- an updated builder
-
tracer
public ServerConfiguration.Builder tracer(Tracer tracer)
Deprecated.Sets an opentracing.io tracer. (Default isGlobalTracer
.)- Parameters:
tracer
- a tracer to set- Returns:
- an updated builder
-
tracer
public ServerConfiguration.Builder tracer(Supplier<? extends Tracer> tracerBuilder)
Deprecated.Sets an opentracing.io tracer. (Default isGlobalTracer
.)- Parameters:
tracerBuilder
- a tracer builder to set; will be built as a first step of this method execution- Returns:
- updated builder
-
enabledSSlProtocols
public ServerConfiguration.Builder enabledSSlProtocols(String... protocols)
Deprecated.Configures the SSL protocols to enable with the default server socket.- Parameters:
protocols
- protocols to enable, ifnull
enables the default protocols- Returns:
- an updated builder
-
enabledSSlProtocols
public ServerConfiguration.Builder enabledSSlProtocols(List<String> protocols)
Deprecated.Configures the SSL protocols to enable with the default server socket.- Parameters:
protocols
- protocols to enable, ifnull
or empty enables the default protocols- Returns:
- an updated builder
-
maxPayloadSize
public ServerConfiguration.Builder maxPayloadSize(long size)
Deprecated.Configure maximum client payload size.- Specified by:
maxPayloadSize
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- maximum payload size- Returns:
- an updated builder
-
backpressureBufferSize
public ServerConfiguration.Builder backpressureBufferSize(long size)
Deprecated.Maximum length of the response data sending buffer can keep without flushing. Depends on `backpressure-policy` what happens if max buffer size is reached.- Specified by:
backpressureBufferSize
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- maximum non-flushed data Netty can buffer until backpressure is applied- Returns:
- an updated builder
-
backpressureStrategy
public ServerConfiguration.Builder backpressureStrategy(BackpressureStrategy backpressureStrategy)
Deprecated.Sets a backpressure strategy for the server to apply against user provided response upstream.- LINEAR - Data are requested one-by-one, in case buffer reaches watermark, no other data is requested.
- AUTO_FLUSH - Data are requested one-by-one, in case buffer reaches watermark, no other data is requested.
- PREFETCH - After first data chunk arrives, probable number of chunks needed to fill the buffer up to watermark is calculated and requested.
- NONE - No backpressure is applied, Long.MAX_VALUE(unbounded) is requested from upstream.
- Specified by:
backpressureStrategy
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
backpressureStrategy
- One of NONE, PREFETCH, LINEAR or AUTO_FLUSH, default is AUTO_FLUSH- Returns:
- an updated builder
-
continueImmediately
public ServerConfiguration.Builder continueImmediately(boolean continueImmediately)
Deprecated.When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.Default is
false
- Specified by:
continueImmediately
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
continueImmediately
- , answer with 100 continue immediately after expect continue, default is false- Returns:
- this builder
-
addRequestedUriDiscoveryType
public ServerConfiguration.Builder addRequestedUriDiscoveryType(SocketConfiguration.RequestedUriDiscoveryType type)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Adds a type of front-end URI discovery Helidon should use for this socket. Adding a discovery type automatically enables discovery for the socket.- Specified by:
addRequestedUriDiscoveryType
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
type
- type to add- Returns:
- updated builder
-
requestedUriDiscoveryTypes
public ServerConfiguration.Builder requestedUriDiscoveryTypes(List<SocketConfiguration.RequestedUriDiscoveryType> types)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Assigns the front-end URI discovery type(s) this socket should use. This setting automatically enables discovery for the socket.- Specified by:
requestedUriDiscoveryTypes
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
types
-SocketConfiguration.RequestedUriDiscoveryType
values to assign- Returns:
- updated builder
- See Also:
SocketConfiguration.SocketConfigurationBuilder.addRequestedUriDiscoveryType(io.helidon.webserver.SocketConfiguration.RequestedUriDiscoveryType)
,SocketConfiguration.SocketConfigurationBuilder.requestedUriDiscoveryEnabled(boolean)
,ServerRequest.requestedUri()
-
requestedUriDiscoveryEnabled
public ServerConfiguration.Builder requestedUriDiscoveryEnabled(boolean enabled)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Sets whether requested URI discovery is enabled for the socket.- Specified by:
requestedUriDiscoveryEnabled
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
enabled
- whether to enable discovery- Returns:
- updated builder
- See Also:
ServerRequest.requestedUri()
-
trustedProxies
public ServerConfiguration.Builder trustedProxies(AllowList trustedProxies)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Assigns the settings governing the acceptance and rejection of forwarded headers from incoming requests to this socket. This setting automatically enables discovery for the socket.- Specified by:
trustedProxies
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
trustedProxies
- to apply to forwarded headers- Returns:
- updated builder
- See Also:
ServerRequest.requestedUri()
-
connectionIdleTimeout
public ServerConfiguration.Builder connectionIdleTimeout(int seconds)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Sets the number of seconds after which an idle connection will be automatically closed by the server.- Specified by:
connectionIdleTimeout
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
seconds
- time in seconds- Returns:
- updated builder
-
maxShutdownTimeout
public ServerConfiguration.Builder maxShutdownTimeout(Duration maxShutdownTimeout)
Deprecated.Configure the maximum amount of time that the server will wait to shut down regardless of the value of any additionally requested quiet period.- Parameters:
maxShutdownTimeout
- theDuration
to use- Returns:
- an updated builder
-
shutdownQuietPeriod
public ServerConfiguration.Builder shutdownQuietPeriod(Duration shutdownQuietPeriod)
Deprecated.Configure the quiet period during which the webserver will wait for new incoming connections after it has been told to shut down.- Parameters:
shutdownQuietPeriod
- theDuration
to use- Returns:
- an updated builder
-
experimental
public ServerConfiguration.Builder experimental(ExperimentalConfiguration experimental)
Deprecated.Configure experimental features.- Parameters:
experimental
- experimental configuration- Returns:
- an updated builder
-
transport
public ServerConfiguration.Builder transport(Transport transport)
Deprecated.Configure transport.- Parameters:
transport
- aTransport
- Returns:
- an updated builder
-
printFeatureDetails
public ServerConfiguration.Builder printFeatureDetails(boolean print)
Deprecated.Set totrue
to print detailed feature information on startup.- Parameters:
print
- whether to print details or not- Returns:
- updated builder instance
- See Also:
HelidonFeatures
-
context
public ServerConfiguration.Builder context(Context context)
Deprecated.Configure the application scoped context to be used as a parent for webserver request contexts.- Parameters:
context
- top level context- Returns:
- an updated builder
-
config
public ServerConfiguration.Builder config(Config config)
Deprecated.Sets configuration values included in providedConfig
parameter.It can be used for configuration externalisation.
All parameters sets before this method call can be seen as defaults and all parameters sets after can be seen as forced.
- Specified by:
config
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
config
- the configuration to use- Returns:
- an updated builder
-
build
public ServerConfiguration build()
Deprecated.Builds a new configuration instance.- Specified by:
build
in interfaceBuilder<ServerConfiguration>
- Returns:
- a new instance
-
timeout
public ServerConfiguration.Builder timeout(long amount, TimeUnit unit)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Configures a server socket timeout.- Specified by:
timeout
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
amount
- an amount of time to configure the timeout, use0
for infinite timeoutunit
- time unit to use with the configured amount- Returns:
- this builder
-
tls
public ServerConfiguration.Builder tls(WebServerTls webServerTls)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Configures SSL for this socket. When configured, the server enforces SSL configuration. If this method is called, any other method except forSocketConfiguration.SocketConfigurationBuilder.tls(java.util.function.Supplier)
ยจ and repeated invocation of this method would be ignored.If this method is called again, the previous configuration would be ignored.
- Specified by:
tls
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
webServerTls
- ssl configuration to use with this socket- Returns:
- this builder
-
enableCompression
public ServerConfiguration.Builder enableCompression(boolean value)
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilder
Enable negotiation for gzip/deflate content encodings. Clients can request compression using the "Accept-Encoding" header.Default is
false
- Specified by:
enableCompression
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
value
- compression flag- Returns:
- this builder
-
-