Package org.eclipse.jetty.servlets
Enum DoSFilter.Action
- java.lang.Object
-
- java.lang.Enum<DoSFilter.Action>
-
- org.eclipse.jetty.servlets.DoSFilter.Action
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DoSFilter.Action>
- Enclosing class:
- DoSFilter
public static enum DoSFilter.Action extends java.lang.Enum<DoSFilter.Action>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORT
The request and response is aborted, no response is sent.DELAY
The request is delayed based onDoSFilter.getDelayMs()
NO_ACTION
No action is taken against the Request, it is allowed to be processed normally.REJECT
The request is rejected by sending an error based onDoSFilter.getTooManyCode()
THROTTLE
The request is throttled.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoSFilter.Action
fromDelay(long delayMs)
Obtain the Action based on configuredDoSFilter.getDelayMs()
static DoSFilter.Action
valueOf(java.lang.String name)
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 Detail
-
NO_ACTION
public static final DoSFilter.Action NO_ACTION
No action is taken against the Request, it is allowed to be processed normally.
-
ABORT
public static final DoSFilter.Action ABORT
The request and response is aborted, no response is sent.
-
REJECT
public static final DoSFilter.Action REJECT
The request is rejected by sending an error based onDoSFilter.getTooManyCode()
-
DELAY
public static final DoSFilter.Action DELAY
The request is delayed based onDoSFilter.getDelayMs()
-
THROTTLE
public static final DoSFilter.Action THROTTLE
The request is throttled.
-
-
Method Detail
-
values
public static DoSFilter.Action[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DoSFilter.Action c : DoSFilter.Action.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DoSFilter.Action valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromDelay
public static DoSFilter.Action fromDelay(long delayMs)
Obtain the Action based on configuredDoSFilter.getDelayMs()
- Parameters:
delayMs
- the delay in milliseconds.- Returns:
- the Action proposed.
-
-