- 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.BuilderinsteadAServerConfigurationbuilder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ServerConfiguration.BuilderaddSocket(String name, int port, InetAddress bindAddress)Deprecated.since 2.0.0, please useaddSocket(String, SocketConfiguration)insteadServerConfiguration.BuilderaddSocket(String name, SocketConfiguration socketConfiguration)Deprecated.Adds an additional named server socket configuration.ServerConfiguration.BuilderaddSocket(String name, Supplier<SocketConfiguration> socketConfigurationBuilder)Deprecated.Adds an additional named server socket configuration builder.ServerConfiguration.Builderbacklog(int size)Deprecated.Sets a maximum length of the queue of incoming connections.ServerConfiguration.BuilderbindAddress(InetAddress bindAddress)Deprecated.Sets a local address for server to bind.ServerConfigurationbuild()Deprecated.Builds a new configuration instance.ServerConfiguration.Builderconfig(Config config)Deprecated.Sets configuration values included in providedConfigparameter.ServerConfiguration.Buildercontext(io.helidon.common.context.Context context)Deprecated.Configure the application scoped context to be used as a parent for webserver request contexts.ServerConfiguration.BuilderenableCompression(boolean value)Deprecated.Enable negotiation for gzip/deflate content encodings.ServerConfiguration.BuilderenabledSSlProtocols(String... protocols)Deprecated.Configures the SSL protocols to enable with the default server socket.ServerConfiguration.BuilderenabledSSlProtocols(List<String> protocols)Deprecated.Configures the SSL protocols to enable with the default server socket.ServerConfiguration.Builderexperimental(ExperimentalConfiguration experimental)Deprecated.Configure experimental features.ServerConfiguration.BuildermaxHeaderSize(int size)Deprecated.Maximal number of bytes of all header values combined.ServerConfiguration.BuildermaxInitialLineLength(int length)Deprecated.Maximal number of characters in the initial HTTP line.ServerConfiguration.BuildermaxPayloadSize(long size)Deprecated.Configure maximum client payload size.ServerConfiguration.Builderport(int port)Deprecated.Sets server port.ServerConfiguration.BuilderprintFeatureDetails(boolean print)Deprecated.Set totrueto print detailed feature information on startup.ServerConfiguration.BuilderreceiveBufferSize(int bytes)Deprecated.Propose value of the TCP receive window that is advertised to the remote peer.ServerConfiguration.Builderssl(Supplier<? extends SSLContext> sslContextBuilder)Deprecated.SetsSSLContextto to use with the server.ServerConfiguration.Builderssl(SSLContext sslContext)Deprecated.SetsSSLContextto to use with the server.ServerConfiguration.Buildertimeout(int milliseconds)Deprecated.Sets a socket timeout in milliseconds or0for infinite timeout.ServerConfiguration.Buildertimeout(long amount, TimeUnit unit)Deprecated.Configures a server socket timeout.ServerConfiguration.Buildertls(WebServerTls webServerTls)Deprecated.Configures SSL for this socket.ServerConfiguration.Buildertracer(io.opentracing.Tracer tracer)Deprecated.Sets an opentracing.io tracer.ServerConfiguration.Buildertracer(Supplier<? extends io.opentracing.Tracer> tracerBuilder)Deprecated.Sets an opentracing.io tracer.ServerConfiguration.Buildertransport(Transport transport)Deprecated.Configure transport.ServerConfiguration.BuilderworkersCount(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.SetsSSLContextto to use with the server. If notnullthen server enforce SSL communication.- Parameters:
sslContext- ssl context- Returns:
- an updated builder
-
ssl
public ServerConfiguration.Builder ssl(Supplier<? extends SSLContext> sslContextBuilder)
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
public ServerConfiguration.Builder port(int 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
public ServerConfiguration.Builder bindAddress(InetAddress 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
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:
backlogin 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 or0for 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. 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
public ServerConfiguration.Builder maxHeaderSize(int size)
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
public ServerConfiguration.Builder maxInitialLineLength(int length)
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
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
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, 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
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(io.opentracing.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 io.opentracing.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, ifnullenables 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, ifnullor empty enables the default protocols- Returns:
- an updated builder
-
maxPayloadSize
public ServerConfiguration.Builder maxPayloadSize(long size)
Deprecated.Configure maximum client payload size.- Specified by:
maxPayloadSizein interfaceSocketConfiguration.SocketConfigurationBuilder<ServerConfiguration.Builder>- Parameters:
size- maximum payload size- 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 totrueto 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(io.helidon.common.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 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
public ServerConfiguration build()
Deprecated.Builds a new configuration instance.- Specified by:
buildin interfaceBuilder<ServerConfiguration>- Returns:
- a new instance
-
timeout
public ServerConfiguration.Builder timeout(long amount, TimeUnit unit)
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
public ServerConfiguration.Builder tls(WebServerTls webServerTls)
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
public ServerConfiguration.Builder enableCompression(boolean value)
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
-
-