Class JdkHttpServerConfiguration
java.lang.Object
io.micronaut.http.server.HttpServerConfiguration
io.micronaut.servlet.http.server.jdk.JdkHttpServerConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable, io.micronaut.http.context.ServerContextPathProvider, io.micronaut.scheduling.executor.ThreadSelectionConfiguration
@ConfigurationProperties("jdk")
@Replaces(io.micronaut.http.server.HttpServerConfiguration.class)
public class JdkHttpServerConfiguration
extends io.micronaut.http.server.HttpServerConfiguration
implements io.micronaut.core.util.Toggleable
Configuration for the built-in JDK HTTP server runtime.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAccess log configuration for the built-in server, named as the Netty server'smicronaut.server.netty.access-logger.Nested classes/interfaces inherited from class io.micronaut.http.server.HttpServerConfiguration
io.micronaut.http.server.HttpServerConfiguration.CorsConfiguration, io.micronaut.http.server.HttpServerConfiguration.ErrorResponseIncludeMessageMode, io.micronaut.http.server.HttpServerConfiguration.FileTypeHandlerConfiguration, io.micronaut.http.server.HttpServerConfiguration.HostResolutionConfiguration, io.micronaut.http.server.HttpServerConfiguration.HttpLocaleResolutionConfigurationProperties, io.micronaut.http.server.HttpServerConfiguration.MultipartConfiguration -
Field Summary
FieldsFields inherited from class io.micronaut.http.server.HttpServerConfiguration
DEFAULT_DATEHEADER, DEFAULT_DISPATCH_OPTIONS_REQUESTS, DEFAULT_DUAL_PROTOCOL, DEFAULT_ERROR_RESPONSE_INCLUDE_MESSAGE, DEFAULT_HTTP_TO_HTTPS_REDIRECT, DEFAULT_IDLE_TIME_MINUTES, DEFAULT_LOG_HANDLED_EXCEPTIONS, DEFAULT_MAX_PARAMS, DEFAULT_MAX_REQUEST_BUFFER_SIZE, DEFAULT_MAX_REQUEST_SIZE, DEFAULT_PORT, DEFAULT_RANDOM_PORT, DEFAULT_READ_IDLE_TIME_MINUTES, DEFAULT_SEMICOLON_IS_NORMAL_CHAR, DEFAULT_WRITE_IDLE_TIME_MINUTES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe access log configuration.booleanvoidsetAccessLogger(JdkHttpServerConfiguration.AccessLogger accessLogger) Sets the access log configuration.voidsetEnabled(boolean enabled) Sets whether the JDK HTTP server runtime is enabled.Methods inherited from class io.micronaut.http.server.HttpServerConfiguration
getApplicationConfiguration, getClientAddressHeader, getContextPath, getCors, getDefaultCharset, getErrorResponseIncludeMessage, getHost, getHostResolution, getHttpVersion, getIdleTimeout, getLocaleResolution, getMaxParams, getMaxRequestBufferSize, getMaxRequestSize, getMultipart, getPort, getReadIdleTimeout, getReadTimeout, getServerHeader, getThreadSelection, getWriteIdleTimeout, isDateHeader, isDispatchOptionsRequests, isDualProtocol, isEscapeHtmlUrl, isHttpToHttpsRedirect, isLogHandledExceptions, isNotFoundOnMissingBody, isRedispatchNonBlockingOnly, isSemicolonIsNormalChar, isValidateUrl, setClientAddressHeader, setContextPath, setCors, setDateHeader, setDefaultCharset, setDispatchOptionsRequests, setDualProtocol, setErrorResponseIncludeMessage, setEscapeHtmlUrl, setHost, setHostResolution, setHttpToHttpsRedirect, setHttpVersion, setIdleTimeout, setLocaleResolution, setLogHandledExceptions, setMaxParams, setMaxRequestBufferSize, setMaxRequestSize, setMultipart, setNotFoundOnMissingBody, setPort, setReadIdleTimeout, setReadTimeout, setRedispatchNonBlockingOnly, setSemicolonIsNormalChar, setServerHeader, setThreadSelection, setValidateUrl, setWriteIdleTimeout
-
Field Details
-
PREFIX
- See Also:
-
ENABLED_PROPERTY
- See Also:
-
-
Constructor Details
-
JdkHttpServerConfiguration
public JdkHttpServerConfiguration()Default constructor.
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
getAccessLogger
The access log configuration.- Returns:
- The access log configuration
- Since:
- 6.2.0
-
setAccessLogger
Sets the access log configuration.- Parameters:
accessLogger- The access log configuration- Since:
- 6.2.0
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the JDK HTTP server runtime is enabled.- Parameters:
enabled- True if the runtime is enabled
-