Package io.micronaut.http.poja.apache
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 with400 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe default time to wait for an unread request body.static final intThe default maximum number of headers.static final intThe default maximum line length. -
Constructor Summary
ConstructorsConstructorDescriptionApacheServletConfiguration(int inputBufferSize, int outputBufferSize, boolean useInheritedChannel) Constructor that applies the default line and header limits and discard timeout.ApacheServletConfiguration(int inputBufferSize, int outputBufferSize, boolean useInheritedChannel, int maxLineLength, int maxHeaderCount, Duration discardTimeout) Canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediscardTimeoutrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinputBufferSizerecord component.intReturns the value of themaxHeaderCountrecord component.intReturns the value of themaxLineLengthrecord component.intReturns the value of theoutputBufferSizerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseInheritedChannelrecord component.
-
Field Details
-
DEFAULT_MAX_LINE_LENGTH
public static final int DEFAULT_MAX_LINE_LENGTHThe default maximum line length.- See Also:
-
DEFAULT_MAX_HEADER_COUNT
public static final int DEFAULT_MAX_HEADER_COUNTThe default maximum number of headers.- See Also:
-
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 sizeoutputBufferSize- The output buffer sizeuseInheritedChannel- Whether to use the inherited channelmaxLineLength- The maximum line lengthmaxHeaderCount- The maximum number of headersdiscardTimeout- 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 sizeoutputBufferSize- The output buffer sizeuseInheritedChannel- Whether to use the inherited channel
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
inputBufferSize
@Bindable(defaultValue="8192") public int inputBufferSize()Returns the value of theinputBufferSizerecord component.- Returns:
- the value of the
inputBufferSizerecord component
-
outputBufferSize
@Bindable(defaultValue="8192") public int outputBufferSize()Returns the value of theoutputBufferSizerecord component.- Returns:
- the value of the
outputBufferSizerecord component
-
useInheritedChannel
@Bindable(defaultValue="true") public boolean useInheritedChannel()Returns the value of theuseInheritedChannelrecord component.- Returns:
- the value of the
useInheritedChannelrecord component
-
maxLineLength
@Bindable(defaultValue="8192") public int maxLineLength()Returns the value of themaxLineLengthrecord component.- Returns:
- the value of the
maxLineLengthrecord component
-
maxHeaderCount
@Bindable(defaultValue="100") public int maxHeaderCount()Returns the value of themaxHeaderCountrecord component.- Returns:
- the value of the
maxHeaderCountrecord component
-
discardTimeout
Returns the value of thediscardTimeoutrecord component.- Returns:
- the value of the
discardTimeoutrecord component
-