Package com.jsgalactic.axiom.http
Record Class MultipartParser.Limits
java.lang.Object
java.lang.Record
com.jsgalactic.axiom.http.MultipartParser.Limits
- Enclosing class:
MultipartParser
public static record MultipartParser.Limits(int maxParts, int maxPartBytes, int maxHeaderBytes, long maxTotalBytes)
extends Record
Bounds applied while a multipart body is read.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MultipartParser.LimitsSixteen parts of at most 1 MiB, 8 KiB of headers per part and 16 MiB in total. -
Constructor Summary
ConstructorsConstructorDescriptionLimits(int maxParts, int maxPartBytes, int maxHeaderBytes, long maxTotalBytes) Validates and creates limits; every bound must be positive. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxHeaderBytesrecord component.intReturns the value of themaxPartBytesrecord component.intmaxParts()Returns the value of themaxPartsrecord component.longReturns the value of themaxTotalBytesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Sixteen parts of at most 1 MiB, 8 KiB of headers per part and 16 MiB in total.
-
-
Constructor Details
-
Limits
public Limits(int maxParts, int maxPartBytes, int maxHeaderBytes, long maxTotalBytes) Validates and creates limits; every bound must be positive.- Parameters:
maxParts- largest number of partsmaxPartBytes- largest content of one partmaxHeaderBytes- largest header section of one part, including line endsmaxTotalBytes- largest number of body bytes read, including framing- Throws:
IllegalArgumentException- if any bound is not positive
-
-
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. All components in this record class are compared with '=='. -
maxParts
public int maxParts()Returns the value of themaxPartsrecord component.- Returns:
- the value of the
maxPartsrecord component
-
maxPartBytes
public int maxPartBytes()Returns the value of themaxPartBytesrecord component.- Returns:
- the value of the
maxPartBytesrecord component
-
maxHeaderBytes
public int maxHeaderBytes()Returns the value of themaxHeaderBytesrecord component.- Returns:
- the value of the
maxHeaderBytesrecord component
-
maxTotalBytes
public long maxTotalBytes()Returns the value of themaxTotalBytesrecord component.- Returns:
- the value of the
maxTotalBytesrecord component
-