- 
- All Superinterfaces:
- SocketConfiguration
 
 public interface ServerConfiguration extends SocketConfiguration WebServerconfiguration.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classServerConfiguration.BuilderDeprecated.since 2.0.0 - useWebServer.Builderinstead- 
Nested classes/interfaces inherited from interface io.helidon.webserver.SocketConfigurationSocketConfiguration.RequestedUriDiscoveryType, SocketConfiguration.SocketConfigurationBuilder<B extends SocketConfiguration.SocketConfigurationBuilder<B>>
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_SOCKET_NAMEDeprecated.since 2.0.0, please useWebServer.DEFAULT_SOCKET_NAME- 
Fields inherited from interface io.helidon.webserver.SocketConfigurationDEFAULT, DEFAULT_BACKLOG_SIZE
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description intbacklog()Returns a maximum length of the queue of incoming connections on the default server socket.InetAddressbindAddress()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.Builderbuilder(Config config)Deprecated.since 2.0.0 - please useWebServer.builder(), thenWebServer.Builder.config(io.helidon.config.Config), orWebServer.create(Routing, io.helidon.config.Config)Contextcontext()The top levelContextto be used by this webserver.static ServerConfigurationcreate(Config config)Creates new instance with defaults from external configuration source.ExperimentalConfigurationexperimental()Returns anExperimentalConfiguration.default booleanisHttp2Enabled()Checks if HTTP/2 is enabled in config.default DurationmaxShutdownTimeout()The 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.booleanprintFeatureDetails()Whether to print details ofHelidonFeatures.intreceiveBufferSize()Returns proposed value of the TCP receive window that is advertised to the remote peer on the default server socket.default DurationshutdownQuietPeriod()The quiet period during which the webserver will wait for new incoming connections after it has been told to shut down.default SocketConfigurationsocket(String name)Deprecated.since 2.0.0, please usenamedSocket(String)insteadMap<String,SocketConfiguration>sockets()A map of all the configured server sockets; that is the default server socket which is identified by the keyDEFAULT_SOCKET_NAMEand also all the additional named server socket configurations.SSLContextssl()Deprecated, for removal: This API element is subject to removal in a future version.usetls().sslContext()instead.inttimeoutMillis()Returns a default server socket timeout in milliseconds or0for an infinite timeout.Tracertracer()Returns an opentracing.io tracer.default Optional<Transport>transport()Returns an optionalTransport.intworkersCount()Returns the count of threads in the pool used to process HTTP requests.- 
Methods inherited from interface io.helidon.webserver.SocketConfigurationallowedCipherSuite, backpressureBufferSize, backpressureStrategy, clientAuth, connectionIdleTimeout, continueImmediately, enableCompression, enabled, enabledSslProtocols, initialBufferSize, maxChunkSize, maxHeaderSize, maxInitialLineLength, maxPayloadSize, name, requestedUriDiscoveryEnabled, requestedUriDiscoveryTypes, tls, trustedProxies, validateHeaders
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_SOCKET_NAME@Deprecated static final String DEFAULT_SOCKET_NAME Deprecated.since 2.0.0, please useWebServer.DEFAULT_SOCKET_NAMEThe default server socket configuration name. All the default server socket configuration (e.g.,port()orbacklog()) is accessible throughsocket(String)orsockets()with thisdefault socket name.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
workersCountint workersCount() Returns the count of threads in the pool used to process HTTP requests.Default value is Runtime.availableProcessors().- Returns:
- a workers count
 
 - 
portint 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 interface- SocketConfiguration
- Returns:
- the server port of the default server socket
 
 - 
bindAddressInetAddress 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 interface- SocketConfiguration
- Returns:
- an address to bind with the default server socket; nullfor all local addresses
 
 - 
backlogint 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 interface- SocketConfiguration
- Returns:
- a maximum length of the queue of incoming connections
 
 - 
timeoutMillisint 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 interface- SocketConfiguration
- Returns:
- a default server socket timeout in milliseconds or 0
 
 - 
receiveBufferSizeint 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 interface- SocketConfiguration
- Returns:
- a buffer size in bytes of the default server socket or 0
 
 - 
ssl@Deprecated(since="2.3.1", forRemoval=true) SSLContext ssl() Deprecated, for removal: This API element is subject to removal in a future version.usetls().sslContext()instead. This method will be removed at 3.0.0 version.Returns aSSLContextto use with the default server socket. If notnullthen the server enforces an SSL communication.Additional named server socket configuration is accessible through the socket(String)andsockets()methods.- Specified by:
- sslin interface- SocketConfiguration
- Returns:
- a SSL context to use
 
 - 
socket@Deprecated default SocketConfiguration socket(String name) 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
 
 - 
namedSocketdefault Optional<SocketConfiguration> namedSocket(String name) 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
 
 - 
socketsMap<String,SocketConfiguration> sockets() A map of all the configured server sockets; that is the default server socket which is identified by the keyDEFAULT_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
 
 - 
maxShutdownTimeoutdefault Duration 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
 
 - 
shutdownQuietPerioddefault Duration 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
 
 - 
tracerTracer tracer() Returns an opentracing.io tracer. Default isGlobalTracer.- Returns:
- a tracer to use - never null(defaulting toGlobalTracer
 
 - 
contextContext context() The top levelContextto be used by this webserver.- Returns:
- a context instance with registered application scoped instances
 
 - 
experimentalExperimentalConfiguration experimental() Returns anExperimentalConfiguration.- Returns:
- Experimental configuration.
 
 - 
transportdefault Optional<Transport> transport() Returns an optionalTransport.- Returns:
- an optional Transport
 
 - 
printFeatureDetailsboolean printFeatureDetails() Whether to print details ofHelidonFeatures.- Returns:
- whether to print details
 
 - 
isHttp2Enableddefault boolean isHttp2Enabled() Checks if HTTP/2 is enabled in config.- Returns:
- Outcome of test.
 
 - 
createstatic ServerConfiguration create(Config config) Creates new instance with defaults from external configuration source.- Parameters:
- config- the externalized configuration
- Returns:
- a new instance
 
 - 
builder@Deprecated static ServerConfiguration.Builder builder() Deprecated.since 2.0.0 - please useWebServer.builder()insteadCreates new instance of aserver configuration builder.- Returns:
- a new builder instance
 
 - 
builder@Deprecated static ServerConfiguration.Builder builder(Config config) 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
 
 
- 
 
-