Class WebServerConfig.BuilderBase.WebServerConfigImpl
java.lang.Object
io.helidon.webserver.ListenerConfig.BuilderBase.ListenerConfigImpl
io.helidon.webserver.WebServerConfig.BuilderBase.WebServerConfigImpl
- All Implemented Interfaces:
Prototype.Api, Prototype.Factory<WebServer>, ListenerConfig, WebServerConfig, Supplier<WebServer>
- Enclosing class:
WebServerConfig.BuilderBase<BUILDER extends WebServerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WebServerConfig>
protected static class WebServerConfig.BuilderBase.WebServerConfigImpl
extends ListenerConfig.BuilderBase.ListenerConfigImpl
implements WebServerConfig, Supplier<WebServer>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ListenerConfig
ListenerConfig.Builder, ListenerConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forListenerConfig.static classListenerConfig.BuilderBase<BUILDER extends ListenerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ListenerConfig>Fluent API builder base forListenerConfig.Nested classes/interfaces inherited from interface WebServerConfig
WebServerConfig.Builder, WebServerConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forWebServer.static classWebServerConfig.BuilderBase<BUILDER extends WebServerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WebServerConfig>Fluent API builder base forWebServerConfig. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebServerConfigImpl(WebServerConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new runtime instance from this prototype.booleanfeatures()Server features allow customization of the server, listeners, or routings.get()inthashCode()Routing for additional sockets.Context for the WebServer, if none defined, a new one will be created with global context as the root.booleanWhen true the webserver registers a shutdown hook with the JVM Runtime.sockets()Socket configurations.toString()Methods inherited from class ListenerConfig.BuilderBase.ListenerConfigImpl
address, backlog, bindAddress, bindings, concurrencyLimit, connectionOptions, connectionSelectorProviders, connectionSelectors, contentEncoding, directHandlers, enableProxyProtocol, errorHandling, host, idleConnectionPeriod, idleConnectionTimeout, ignoreInvalidNamedRouting, listenerContext, listenerSocketOptions, maxConcurrentRequests, maxConnections, maxInMemoryEntity, maxPayloadSize, maxTcpConnections, mediaContext, name, port, protocols, proxyProtocol, requestedUriDiscoveryContext, restoreResponseHeaders, routing, routings, shutdownGracePeriod, smartAsyncWrites, sni, tls, useNio, virtualHosts, writeBufferSize, writeQueueLengthModifier and TypeMethodDescriptionaddress()Address to use.intbacklog()Accept backlog.The TCP address to bind to (<host>:<port>); Unix domain addresses are rejected and must instead usebindings.uds.socket.bindings()Transport bindings that serve this listener are configured as one object keyed by binding type; list form and nestednameortypeare invalid, and built-in TCP remains enabled unlessbindings.tcp.enabled=false.Concurrency limit to use to limit concurrent execution of incoming requests.Options for connections accepted by this listener.Providers of connection selectors discovered for this listener.Explicitly defined connection selectors to be used with this socket.Configure the listener specificContentEncodingContext.Direct handlers specific for this listener.booleanDeprecated, for removal: This API element is subject to removal in a future version.Configuration for this listener's error handling.host()Host of the default socket.How often should we check forListenerConfig.idleConnectionTimeout().How long should we wait before closing a connection that has no traffic on it.booleanIf set totrue, any named routing configured that does not have an associated named listener will NOT cause an exception to be thrown (default behavior is to throw an exception).Listener scoped context to be used as a parent for webserver request contexts (if used).Map<SocketOption<?>, Object> Server listener socket options.intLimits the number of requests that can be executed at the same time (the number of active virtual threads of requests).intLimits listener-wide connection admission shared by all connection-oriented bindings.intIf the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance when writing it.longMaximal number of bytes an entity may have.intDeprecated, for removal: This API element is subject to removal in a future version.Configure the listener specificMediaContext.name()Name of this socket.intport()Port of the default socket.Configuration of protocols.PROXY protocol configuration.Requested URI discovery context.booleanCopy and restore response headers before and after passing a request to Jersey for processing.routing()Http routing.routings()List of all routings (possibly for multiple protocols).Grace period in ISO 8601 duration format to allow running tasks to complete before listener's shutdown.booleanIf enabled andListenerConfig.writeQueueLength()is greater than 1, then start with async writes but possibly switch to sync writes if async queue size is always below a certain threshold.sni()Listener-scoped server TLS SNI policy.tls()Listener TLS configuration.booleanuseNio()Whether to use an NIO socket channel instead of a socket; Unix domain socket bindings always use NIO and ignore this setting, while listener TLS virtual hosts require it to betrue.Listener TLS virtual hosts selected by SNI; requires listener TLS and NIO socket-channel transport (use-nio=true).intInitial buffer size in bytes ofBufferedOutputStreamcreated internally to write data to a socket connection.intNumber of buffers queued for write operations.Methods inherited from interface ListenerConfig
configureSocket, configureSocketModifier and TypeMethodDescriptiondefault voidconfigureSocket(ServerSocket socket) Update the server socket with configured socket options.default voidconfigureSocket(ServerSocketChannel socket) Update the server socket with configured socket options.
-
Constructor Details
-
WebServerConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Create a new runtime instance from this prototype.- Specified by:
buildin interfacePrototype.Factory<WebServer>- Returns:
- new configured runtime instance
-
get
-
shutdownHook
public boolean shutdownHook()Description copied from interface:WebServerConfigWhen 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.
- Specified by:
shutdownHookin interfaceWebServerConfig- Returns:
- whether to register a shutdown hook
-
sockets
Description copied from interface:WebServerConfigSocket configurations. Note that socket named "@default" cannot be used, configure the values on the server directly.- Specified by:
socketsin interfaceWebServerConfig- Returns:
- map of listener configurations, except for the default one
-
namedRoutings
Description copied from interface:WebServerConfigRouting for additional sockets. Note that socket named "@default" cannot be used, configure the routing on the server directly.- Specified by:
namedRoutingsin interfaceWebServerConfig- Returns:
- map of routing
-
features
Description copied from interface:WebServerConfigServer features allow customization of the server, listeners, or routings.- Specified by:
featuresin interfaceWebServerConfig- Returns:
- server features
-
serverContext
Description copied from interface:WebServerConfigContext for the WebServer, if none defined, a new one will be created with global context as the root.- Specified by:
serverContextin interfaceWebServerConfig- Returns:
- server context
-
toString
- Overrides:
toStringin classListenerConfig.BuilderBase.ListenerConfigImpl
-
equals
- Overrides:
equalsin classListenerConfig.BuilderBase.ListenerConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classListenerConfig.BuilderBase.ListenerConfigImpl
-