Package io.micronaut.http.filter
Enum Class ServerFilterPhase
- All Implemented Interfaces:
Serializable
,Comparable<ServerFilterPhase>
,Constable
Represents phases of server filters. Each phase has a range of 1000 under its control.
There are gaps between phases to account for additions of future phases. Filters
relying on phases must ensure the order is within the selected phases range. For example
ServerFilterPhase.TRACING.before() - 500
is considered an invalid usage of the TRACING
phase because that would place the order at 18251, which is outside of the range of the
phase (18501-19500).- Since:
- 2.0.0
- Author:
- James Kleeh
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe first phase, invoked before all others.The last phase, invoked after all other phases.Any filters related to collecting metrics.Any filters related to rendering the response body.Any filters related to authentication or authorization.Any filters related to creating or reading the HTTP session.Any filters related to tracing HTTP calls. -
Method Summary
Modifier and TypeMethodDescriptionint
after()
int
before()
int
order()
static ServerFilterPhase
Returns the enum constant of this class with the specified name.static ServerFilterPhase[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIRST
The first phase, invoked before all others. -
METRICS
Any filters related to collecting metrics. -
TRACING
Any filters related to tracing HTTP calls. -
SESSION
Any filters related to creating or reading the HTTP session. -
SECURITY
Any filters related to authentication or authorization. -
RENDERING
Any filters related to rendering the response body. -
LAST
The last phase, invoked after all other phases.
-
-
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
-
order
public int order()- Returns:
- The order of the phase
-
before
public int before()- Returns:
- The order before the phase, but after any previous phases
-
after
public int after()- Returns:
- The order after the phase, but before any future phases
-