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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Access log configuration for the built-in server, named as the Netty server's micronaut.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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields 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
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    The access log configuration.
    boolean
     
    void
    Sets the access log configuration.
    void
    setEnabled(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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • JdkHttpServerConfiguration

      public JdkHttpServerConfiguration()
      Default constructor.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • getAccessLogger

      public JdkHttpServerConfiguration.AccessLogger getAccessLogger()
      The access log configuration.
      Returns:
      The access log configuration
      Since:
      6.2.0
    • setAccessLogger

      public void setAccessLogger(JdkHttpServerConfiguration.AccessLogger accessLogger)
      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