Package org.eclipse.jetty.servlets
Enum DoSFilter.Action
- All Implemented Interfaces:
Serializable
,Comparable<DoSFilter.Action>
- Enclosing class:
DoSFilter
-
Enum Constant Summary
Enum ConstantsEnum 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. -
Constructor Summary
Constructors -
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 type with the specified name.static DoSFilter.Action[]
values()
Returns an array containing the constants of this enum type, 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.
-
-
Constructor Details
-
Action
private Action()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.
-