- All Implemented Interfaces:
Builder<ServerConfiguration.Builder,
,ServerConfiguration> SocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
,Supplier<ServerConfiguration>
- Enclosing interface:
- ServerConfiguration
ServerConfiguration
builder.-
Field Summary
Fields inherited from interface io.helidon.webserver.SocketConfiguration.SocketConfigurationBuilder
REQUESTED_URI_DISCOVERY_CONFIG_KEY_PREFIX
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Adds a type of front-end URI discovery Helidon should use for this socket.addSocket
(String name, int port, InetAddress bindAddress) Deprecated.since 2.0.0, please useaddSocket(String, SocketConfiguration)
insteadaddSocket
(String name, SocketConfiguration socketConfiguration) Deprecated.Adds an additional named server socket configuration.addSocket
(String name, SocketConfiguration.Builder socketConfiguration) Deprecated.Adds an additional named server socket configuration.addSocket
(String name, Supplier<SocketConfiguration> socketConfigurationBuilder) Deprecated.Adds an additional named server socket configuration builder.backlog
(int size) Deprecated.Sets a maximum length of the queue of incoming connections.backpressureBufferSize
(long size) Deprecated.Maximum length of the response data sending buffer can keep without flushing.backpressureStrategy
(BackpressureStrategy backpressureStrategy) Deprecated.Sets a backpressure strategy for the server to apply against user provided response upstream.bindAddress
(InetAddress bindAddress) Deprecated.Sets a local address for server to bind.build()
Deprecated.Builds a new configuration instance.Deprecated.Sets configuration values included in providedConfig
parameter.connectionIdleTimeout
(int seconds) Deprecated.Sets the number of seconds after which an idle connection will be automatically closed by the server.Deprecated.Configure the application scoped context to be used as a parent for webserver request contexts.continueImmediately
(boolean continueImmediately) Deprecated.When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.enableCompression
(boolean value) Deprecated.Enable negotiation for gzip/deflate content encodings.enabledSSlProtocols
(String... protocols) Deprecated.Configures the SSL protocols to enable with the default server socket.enabledSSlProtocols
(List<String> protocols) Deprecated.Configures the SSL protocols to enable with the default server socket.maxHeaderSize
(int size) Deprecated.Maximal number of bytes of all header values combined.maxInitialLineLength
(int length) Deprecated.Maximal number of characters in the initial HTTP line.maxPayloadSize
(long size) Deprecated.Configure maximum client payload size.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.maxUpgradeContentLength
(int size) Deprecated.Set a maximum length of the content of an upgrade request.port
(int port) Deprecated.Sets server port.printFeatureDetails
(boolean print) Deprecated.Set totrue
to print detailed feature information on startup.receiveBufferSize
(int bytes) Deprecated.Propose value of the TCP receive window that is advertised to the remote peer.requestedUriDiscoveryEnabled
(boolean enabled) Deprecated.Sets whether requested URI discovery is enabled for the socket.Deprecated.Assigns the front-end URI discovery type(s) this socket should use.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.ssl
(Supplier<? extends SSLContext> sslContextBuilder) Deprecated.SetsSSLContext
to to use with the server.ssl
(SSLContext sslContext) Deprecated.SetsSSLContext
to to use with the server.timeout
(int milliseconds) Deprecated.Sets a socket timeout in milliseconds or0
for infinite timeout.Deprecated.Configures a server socket timeout.tls
(WebServerTls webServerTls) Deprecated.Configures SSL for this socket.Deprecated.Sets a tracer.Deprecated.Sets a tracer.Deprecated.Configure transport.trustedProxies
(AllowList trustedProxies) Deprecated.Assigns the settings governing the acceptance and rejection of forwarded headers from incoming requests to this socket.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 Details
-
ssl
Deprecated.SetsSSLContext
to to use with the server. If notnull
then server enforce SSL communication.- Parameters:
sslContext
- ssl context- Returns:
- an updated builder
-
ssl
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
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
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
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
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
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
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
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
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, SocketConfiguration.Builder 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 builder- 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
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
Deprecated.Sets a tracer.- Parameters:
tracer
- a tracer to set- Returns:
- an updated builder
-
tracer
Deprecated.Sets a tracer.- Parameters:
tracerBuilder
- a tracer builder to set; will be built as a first step of this method execution- Returns:
- updated builder
-
enabledSSlProtocols
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
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
Deprecated.Configure maximum client payload size.- Specified by:
maxPayloadSize
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- maximum payload size- Returns:
- an updated builder
-
backpressureBufferSize
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
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
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
-
maxUpgradeContentLength
Deprecated.Set a maximum length of the content of an upgrade request.Default is
64*1024
- Specified by:
maxUpgradeContentLength
in interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>
- Parameters:
size
- Maximum length of the content of an upgrade request- 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:
-
requestedUriDiscoveryEnabled
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:
-
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:
-
connectionIdleTimeout
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
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
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
-
transport
Deprecated.Configure transport.- Parameters:
transport
- aTransport
- Returns:
- an updated builder
-
printFeatureDetails
Deprecated.Set totrue
to print detailed feature information on startup.- Parameters:
print
- whether to print details or not- Returns:
- updated builder instance
- See Also:
-
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
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
Deprecated.Builds a new configuration instance.- Specified by:
build
in interfaceBuilder<ServerConfiguration.Builder,
ServerConfiguration> - Returns:
- a new instance
-
timeout
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
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
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
-
WebServer.Builder
instead