Class SerdeTomlConfiguration.ReadConstraints
java.lang.Object
io.micronaut.serde.toml.support.SerdeTomlConfiguration.ReadConstraints
- Enclosing class:
SerdeTomlConfiguration
@ConfigurationProperties("read-constraints")
public static final class SerdeTomlConfiguration.ReadConstraints
extends Object
TOML read constraints.
- Since:
- 3.0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intGuarding against memory exhaustion before parsing a Toml Document, DOS attacks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Integer@Nullable Integer@Nullable IntegervoidsetMaxDocumentSize(@Nullable Integer maxDocumentSize) voidsetMaxNumberLength(@Nullable Integer maxNumberLength) voidsetMaxStringLength(@Nullable Integer maxStringLength)
-
Field Details
-
DEFAULT_MAX_DOCUMENT_SIZE
public static final int DEFAULT_MAX_DOCUMENT_SIZEGuarding against memory exhaustion before parsing a Toml Document, DOS attacks. Configure a non-positive value to disable the limit.- See Also:
-
-
Constructor Details
-
ReadConstraints
public ReadConstraints()
-
-
Method Details
-
getMaxNumberLength
- Returns:
- The maximum number token length, or
nullto use the default
-
setMaxNumberLength
- Parameters:
maxNumberLength- The maximum number token length
-
getMaxStringLength
- Returns:
- The maximum string value length, or
nullfor no limit
-
setMaxStringLength
- Parameters:
maxStringLength- The maximum string value length
-
getMaxDocumentSize
- Returns:
- The maximum document size in bytes, or
null/non-positive for no limit
-
setMaxDocumentSize
- Parameters:
maxDocumentSize- The maximum document size in bytes (nullor non-positive disables the limit)
-