Record Class ApacheServletConfiguration

java.lang.Object
java.lang.Record
io.micronaut.http.poja.apache.ApacheServletConfiguration
Record Components:
inputBufferSize - The size of the buffer that is used to read and parse the HTTP request (in bytes). Default value is 8192 (8Kb).
outputBufferSize - The size of the buffer that is used to write the HTTP response (in bytes). Default value is 8192 (8Kb).
useInheritedChannel - When true, the inherited channel will be used by if present. Otherwise, STDIN and STDOUT will be used.
maxLineLength - The maximum length of the request line, of a header line and of a chunk-size line (in bytes). A request with a longer line is rejected with 400 Bad Request. Default value is 8192 (8Kb).
maxHeaderCount - The maximum number of request headers, and of trailers. Default value is 100.
discardTimeout - How long the runtime waits for the rest of a request body the application left unread, after the response has been sent, before it closes the connection instead. Default value is 10 seconds. It can only be enforced on a socket or channel: when reading standard input, a body the application left unread closes the connection instead.

@ConfigurationProperties("poja.apache") public record ApacheServletConfiguration(int inputBufferSize, int outputBufferSize, boolean useInheritedChannel, int maxLineLength, int maxHeaderCount, Duration discardTimeout) extends Record
Configuration specific to the Apache POJA serverless application.
Since:
4.10.0
Author:
Andriy Dmytruk
  • Field Details

    • DEFAULT_MAX_LINE_LENGTH

      public static final int DEFAULT_MAX_LINE_LENGTH
      The default maximum line length.
      See Also:
    • DEFAULT_MAX_HEADER_COUNT

      public static final int DEFAULT_MAX_HEADER_COUNT
      The default maximum number of headers.
      See Also:
    • DEFAULT_DISCARD_TIMEOUT

      public static final Duration DEFAULT_DISCARD_TIMEOUT
      The default time to wait for an unread request body.
  • Constructor Details

    • ApacheServletConfiguration

      @Creator public ApacheServletConfiguration(@Bindable(defaultValue="8192") int inputBufferSize, @Bindable(defaultValue="8192") int outputBufferSize, @Bindable(defaultValue="true") boolean useInheritedChannel, @Bindable(defaultValue="8192") int maxLineLength, @Bindable(defaultValue="100") int maxHeaderCount, @Bindable(defaultValue="10s") Duration discardTimeout)
      Canonical constructor.
      Parameters:
      inputBufferSize - The input buffer size
      outputBufferSize - The output buffer size
      useInheritedChannel - Whether to use the inherited channel
      maxLineLength - The maximum line length
      maxHeaderCount - The maximum number of headers
      discardTimeout - How long to wait for an unread request body
    • ApacheServletConfiguration

      public ApacheServletConfiguration(int inputBufferSize, int outputBufferSize, boolean useInheritedChannel)
      Constructor that applies the default line and header limits and discard timeout.
      Parameters:
      inputBufferSize - The input buffer size
      outputBufferSize - The output buffer size
      useInheritedChannel - Whether to use the inherited channel
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • inputBufferSize

      @Bindable(defaultValue="8192") public int inputBufferSize()
      Returns the value of the inputBufferSize record component.
      Returns:
      the value of the inputBufferSize record component
    • outputBufferSize

      @Bindable(defaultValue="8192") public int outputBufferSize()
      Returns the value of the outputBufferSize record component.
      Returns:
      the value of the outputBufferSize record component
    • useInheritedChannel

      @Bindable(defaultValue="true") public boolean useInheritedChannel()
      Returns the value of the useInheritedChannel record component.
      Returns:
      the value of the useInheritedChannel record component
    • maxLineLength

      @Bindable(defaultValue="8192") public int maxLineLength()
      Returns the value of the maxLineLength record component.
      Returns:
      the value of the maxLineLength record component
    • maxHeaderCount

      @Bindable(defaultValue="100") public int maxHeaderCount()
      Returns the value of the maxHeaderCount record component.
      Returns:
      the value of the maxHeaderCount record component
    • discardTimeout

      @Bindable(defaultValue="10s") public Duration discardTimeout()
      Returns the value of the discardTimeout record component.
      Returns:
      the value of the discardTimeout record component