- All Implemented Interfaces:
Builder<ServerConfiguration.Builder,,ServerConfiguration> SocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>,Supplier<ServerConfiguration>
- Enclosing interface:
- ServerConfiguration
ServerConfiguration builder.-
Method Summary
Modifier and TypeMethodDescriptionaddSocket(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.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 providedConfigparameter.context(io.helidon.common.context.Context context) Deprecated.Configure the application scoped context to be used as a parent for webserver request contexts.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 totrueto print detailed feature information on startup.receiveBufferSize(int bytes) Deprecated.Propose value of the TCP receive window that is advertised to the remote peer.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.SetsSSLContextto to use with the server.ssl(SSLContext sslContext) Deprecated.SetsSSLContextto to use with the server.timeout(int milliseconds) Deprecated.Sets a socket timeout in milliseconds or0for 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.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, waitMethods inherited from interface io.helidon.webserver.SocketConfiguration.SocketConfigurationBuilder
bindAddress, host, tls
-
Method Details
-
ssl
Deprecated.SetsSSLContextto to use with the server. If notnullthen server enforce SSL communication.- Parameters:
sslContext- ssl context- Returns:
- an updated builder
-
ssl
Deprecated.SetsSSLContextto to use with the server. If notnullthen 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 is0or less then any available ephemeral port will be used.Configuration key:
port- Specified by:
portin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
port- the server port- Returns:
- an updated builder
-
bindAddress
Deprecated.Sets a local address for server to bind. Ifnullthen listens an all local addresses.Configuration key:
bind-address- Specified by:
bindAddressin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
bindAddress- the address to bind the server ornullfor 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:
backlogin 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 or0for 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. If0then implementation default is used.Configuration key:
receive-buffer- Specified by:
receiveBufferSizein interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
bytes- a buffer size in bytes or0- Returns:
- an updated builder
-
maxHeaderSize
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilderMaximal number of bytes of all header values combined. When a bigger value is received, aHttp.Status.BAD_REQUEST_400is returned.Default is
8192- Specified by:
maxHeaderSizein interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
size- maximal number of bytes of combined header values- Returns:
- this builder
-
maxInitialLineLength
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilderMaximal number of characters in the initial HTTP line.Default is
4096- Specified by:
maxInitialLineLengthin 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
Routingconfigured throughWebServer.Builder.addNamedRouting(String, Routing).- Parameters:
name- the name of the additional server socket configurationport- the port to bind; if0or 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
Routingconfigured 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
Routingconfigured 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
Routingconfigured 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, ifnullenables 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, ifnullor empty enables the default protocols- Returns:
- an updated builder
-
maxPayloadSize
Deprecated.Configure maximum client payload size.- Specified by:
maxPayloadSizein interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
size- maximum payload size- Returns:
- an updated builder
-
maxUpgradeContentLength
Deprecated.Set a maximum length of the content of an upgrade request.Default is
64*1024- Specified by:
maxUpgradeContentLengthin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
size- Maximum length of the content of an upgrade request- Returns:
- this 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- theDurationto 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- theDurationto use- Returns:
- an updated builder
-
transport
Deprecated.Configure transport.- Parameters:
transport- aTransport- Returns:
- an updated builder
-
printFeatureDetails
Deprecated.Set totrueto 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 providedConfigparameter.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:
configin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
config- the configuration to use- Returns:
- an updated builder
-
build
Deprecated.Builds a new configuration instance.- Specified by:
buildin interfaceBuilder<ServerConfiguration.Builder,ServerConfiguration> - Returns:
- a new instance
-
timeout
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilderConfigures a server socket timeout.- Specified by:
timeoutin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
amount- an amount of time to configure the timeout, use0for infinite timeoutunit- time unit to use with the configured amount- Returns:
- this builder
-
tls
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilderConfigures 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:
tlsin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
webServerTls- ssl configuration to use with this socket- Returns:
- this builder
-
enableCompression
Deprecated.Description copied from interface:SocketConfiguration.SocketConfigurationBuilderEnable negotiation for gzip/deflate content encodings. Clients can request compression using the "Accept-Encoding" header.Default is
false- Specified by:
enableCompressionin interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
value- compression flag- Returns:
- this builder
-
WebServer.Builderinstead