- All Superinterfaces:
SocketConfiguration
WebServer configuration.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.helidon.webserver.SocketConfiguration
SocketConfiguration.RequestedUriDiscoveryType, SocketConfiguration.SocketConfigurationBuilder<B extends SocketConfiguration.SocketConfigurationBuilder<B>> -
Field Summary
Fields inherited from interface io.helidon.webserver.SocketConfiguration
DEFAULT_BACKLOG_SIZE -
Method Summary
Modifier and TypeMethodDescriptionintbacklog()Returns a maximum length of the queue of incoming connections on the default server socket.Returns local address where the server listens on with the default server socket.static ServerConfiguration.Builderbuilder()Deprecated.since 2.0.0 - please useWebServer.builder()insteadstatic ServerConfiguration.BuilderDeprecated.since 2.0.0 - please useWebServer.builder(), thenWebServer.Builder.config(io.helidon.config.Config), orWebServer.create(Routing, io.helidon.config.Config)context()The top levelContextto be used by this webserver.static ServerConfigurationCreates new instance with defaults from external configuration source.default DurationThe maximum amount of time that the server will wait to shut down regardless of the value of any additionally requested quiet period.default Optional<SocketConfiguration>namedSocket(String name) A socket configuration of an additional named server socket.intport()Returns a server port to listen on with the default server socket.booleanWhether to print details ofHelidonFeatures.intReturns proposed value of the TCP receive window that is advertised to the remote peer on the default server socket.default DurationThe quiet period during which the webserver will wait for new incoming connections after it has been told to shut down.default SocketConfigurationDeprecated.since 2.0.0, please usenamedSocket(String)insteadsockets()A map of all the configured server sockets; that is the default server socket which is identified by the keyWebServer.DEFAULT_SOCKET_NAMEand also all the additional named server socket configurations.intReturns a default server socket timeout in milliseconds or0for an infinite timeout.tracer()Returns a Tracer.Returns an optionalTransport.intReturns the count of threads in the pool used to process HTTP requests.Methods inherited from interface io.helidon.webserver.SocketConfiguration
allowedCipherSuite, backpressureBufferSize, backpressureStrategy, clientAuth, connectionIdleTimeout, continueImmediately, enableCompression, enabled, enabledSslProtocols, initialBufferSize, maxChunkSize, maxHeaderSize, maxInitialLineLength, maxPayloadSize, maxUpgradeContentLength, name, requestedUriDiscoveryEnabled, requestedUriDiscoveryTypes, ssl, tls, trustedProxies, validateHeaders
-
Method Details
-
workersCount
int workersCount()Returns the count of threads in the pool used to process HTTP requests.Default value is
Runtime.availableProcessors().- Returns:
- a workers count
-
port
int port()Returns a server port to listen on with the default server socket. If port is0then any available ephemeral port will be used.Additional named server socket configuration is accessible through the
socket(String)andsockets()methods.- Specified by:
portin interfaceSocketConfiguration- Returns:
- the server port of the default server socket
-
bindAddress
InetAddress bindAddress()Returns local address where the server listens on with the default server socket. Ifnullthen listens an all local addresses.Additional named server socket configuration is accessible through the
socket(String)andsockets()methods.- Specified by:
bindAddressin interfaceSocketConfiguration- Returns:
- an address to bind with the default server socket;
nullfor all local addresses
-
backlog
int backlog()Returns a maximum length of the queue of incoming connections on the default server socket.Default value is
SocketConfiguration.DEFAULT_BACKLOG_SIZE.Additional named server socket configuration is accessible through the
socket(String)andsockets()methods.- Specified by:
backlogin interfaceSocketConfiguration- Returns:
- a maximum length of the queue of incoming connections
-
timeoutMillis
int timeoutMillis()Returns a default server socket timeout in milliseconds or0for an infinite timeout.Additional named server socket configuration is accessible through the
socket(String)andsockets()methods.- Specified by:
timeoutMillisin interfaceSocketConfiguration- Returns:
- a default server socket timeout in milliseconds or
0
-
receiveBufferSize
int receiveBufferSize()Returns proposed value of the TCP receive window that is advertised to the remote peer on the default server socket.If
0then use implementation default.Additional named server socket configuration is accessible through the
socket(String)andsockets()methods.- Specified by:
receiveBufferSizein interfaceSocketConfiguration- Returns:
- a buffer size in bytes of the default server socket or
0
-
socket
Deprecated.since 2.0.0, please usenamedSocket(String)insteadA socket configuration of an additional named server socket.An additional named server socket may have a dedicated
Routingconfigured throughWebServer.Builder.addNamedRouting(String, Routing).- Parameters:
name- the name of the additional server socket- Returns:
- an additional named server socket configuration or
nullif there is no such named server socket
-
namedSocket
A socket configuration of an additional named server socket.An additional named server socket may have a dedicated
Routingconfigured throughWebServer.Builder.addNamedRouting(String, Routing).- Parameters:
name- the name of the additional server socket- Returns:
- an additional named server socket configuration or
emptyif there is no such named server socket configured
-
sockets
Map<String,SocketConfiguration> sockets()A map of all the configured server sockets; that is the default server socket which is identified by the keyWebServer.DEFAULT_SOCKET_NAMEand also all the additional named server socket configurations.An additional named server socket may have a dedicated
Routingconfigured throughWebServer.Builder.addNamedRouting(String, Routing).- Returns:
- a map of all the configured server sockets, never null
-
maxShutdownTimeout
The maximum amount of time that the server will wait to shut down regardless of the value of any additionally requested quiet period.The default implementation of this method returns
Duration.ofSeconds(10L).- Returns:
- the
Durationto use
-
shutdownQuietPeriod
The quiet period during which the webserver will wait for new incoming connections after it has been told to shut down.The webserver will wait no longer than the duration returned by the
maxShutdownTimeout()method.The default implementation of this method returns
Duration.ofSeconds(0L), indicating that there will be no quiet period.- Returns:
- the
Durationto use
-
tracer
Tracer tracer()Returns a Tracer.- Returns:
- a tracer to use - never
null
-
context
Context context()The top levelContextto be used by this webserver.- Returns:
- a context instance with registered application scoped instances
-
transport
Returns an optionalTransport.- Returns:
- an optional
Transport
-
printFeatureDetails
boolean printFeatureDetails()Whether to print details ofHelidonFeatures.- Returns:
- whether to print details
-
create
Creates new instance with defaults from external configuration source.- Parameters:
config- the externalized configuration- Returns:
- a new instance
-
builder
Deprecated.since 2.0.0 - please useWebServer.builder()insteadCreates new instance of aserver configuration builder.- Returns:
- a new builder instance
-
builder
Deprecated.since 2.0.0 - please useWebServer.builder(), thenWebServer.Builder.config(io.helidon.config.Config), orWebServer.create(Routing, io.helidon.config.Config)Creates new instance of aserver configuration builderwith defaults from external configuration source.- Parameters:
config- the externalized configuration- Returns:
- a new builder instance
-
WebServer.Builderinstead