Package org.eclipse.jetty.ee10.servlets
Enum Class DoSFilter.Action
- All Implemented Interfaces:
Serializable
,Comparable<DoSFilter.Action>
,Constable
- Enclosing class:
- DoSFilter
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe request and response is aborted, no response is sent.The request is delayed based onDoSFilter.getDelayMs()
No action is taken against the Request, it is allowed to be processed normally.The request is rejected by sending an error based onDoSFilter.getTooManyCode()
The request is throttled. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoSFilter.Action
fromDelay
(long delayMs) Obtain the Action based on configuredDoSFilter.getDelayMs()
static DoSFilter.Action
Returns the enum constant of this class with the specified name.static DoSFilter.Action[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_ACTION
No action is taken against the Request, it is allowed to be processed normally. -
ABORT
The request and response is aborted, no response is sent. -
REJECT
The request is rejected by sending an error based onDoSFilter.getTooManyCode()
-
DELAY
The request is delayed based onDoSFilter.getDelayMs()
-
THROTTLE
The request is throttled.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromDelay
Obtain the Action based on configuredDoSFilter.getDelayMs()
- Parameters:
delayMs
- the delay in milliseconds.- Returns:
- the Action proposed.
-