- All Superinterfaces:
ListenerConfig
,Prototype.Api
,Prototype.Factory<WebServer>
- All Known Implementing Classes:
WebServerConfig.BuilderBase.WebServerConfigImpl
WebServer configuration bean.
See
WebServer.create(java.util.function.Consumer)
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forWebServer
.static class
WebServerConfig.BuilderBase<BUILDER extends WebServerConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebServerConfig> Fluent API builder base forWebServer
. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebServerConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static WebServerConfig.Builder
builder
(WebServerConfig instance) Create a new fluent API builder from an existing instance.default void
configureSocket
(ServerSocket socket) Update the server socket with configured socket options.static WebServerConfig
create()
Create a new instance with default values.static WebServerConfig
Deprecated.static WebServerConfig
Create a new instance from configuration.features()
Server features allow customization of the server, listeners, or routings.Routing for additional sockets.Context for the WebServer, if none defined, a new one will be created with global context as the root.boolean
When true the webserver registers a shutdown hook with the JVM Runtime.sockets()
Socket configurations.Methods inherited from interface io.helidon.webserver.ListenerConfig
address, backlog, concurrencyLimit, connectionConfig, connectionOptions, connectionSelectors, contentEncoding, directHandlers, enableProxyProtocol, errorHandling, host, idleConnectionPeriod, idleConnectionTimeout, ignoreInvalidNamedRouting, listenerContext, listenerSocketOptions, maxConcurrentRequests, maxInMemoryEntity, maxPayloadSize, maxTcpConnections, mediaContext, name, port, protocols, receiveBufferSize, requestedUriDiscoveryContext, restoreResponseHeaders, routing, routings, shutdownGracePeriod, smartAsyncWrites, tls, writeBufferSize, writeQueueLength
Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
shutdownHook
boolean shutdownHook()When true the webserver registers a shutdown hook with the JVM Runtime.Defaults to true. Set this to false such that a shutdown hook is not registered.
- Returns:
- whether to register a shutdown hook
-
sockets
Map<String,ListenerConfig> sockets()Socket configurations. Note that socket named "@default" cannot be used, configure the values on the server directly.- Returns:
- map of listener configurations, except for the default one
-
namedRoutings
Routing for additional sockets. Note that socket named "@default" cannot be used, configure the routing on the server directly.- Returns:
- map of routing
-
features
List<ServerFeature> features()Server features allow customization of the server, listeners, or routings.- Returns:
- server features
-
serverContext
Context for the WebServer, if none defined, a new one will be created with global context as the root.- Returns:
- server context
-
configureSocket
Update the server socket with configured socket options.- Parameters:
socket
- socket to update
-
create(io.helidon.config.Config)