Package io.micronaut.http.filter
Enum ServerFilterPhase
- java.lang.Object
-
- java.lang.Enum<ServerFilterPhase>
-
- io.micronaut.http.filter.ServerFilterPhase
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ServerFilterPhase>
public enum ServerFilterPhase extends java.lang.Enum<ServerFilterPhase>
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 exampleServerFilterPhase.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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FIRST
The first phase, invoked before all others.LAST
The last phase, invoked after all other phases.METRICS
Any filters related to collecting metrics.RENDERING
Any filters related to rendering the response body.SECURITY
Any filters related to authentication or authorization.SESSION
Any filters related to creating or reading the HTTP session.TRACING
Any filters related to tracing HTTP calls.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
after()
int
before()
int
order()
static ServerFilterPhase
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ServerFilterPhase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FIRST
public static final ServerFilterPhase FIRST
The first phase, invoked before all others.
-
METRICS
public static final ServerFilterPhase METRICS
Any filters related to collecting metrics.
-
TRACING
public static final ServerFilterPhase TRACING
Any filters related to tracing HTTP calls.
-
SESSION
public static final ServerFilterPhase SESSION
Any filters related to creating or reading the HTTP session.
-
SECURITY
public static final ServerFilterPhase SECURITY
Any filters related to authentication or authorization.
-
RENDERING
public static final ServerFilterPhase RENDERING
Any filters related to rendering the response body.
-
LAST
public static final ServerFilterPhase LAST
The last phase, invoked after all other phases.
-
-
Method Detail
-
values
public static ServerFilterPhase[] 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 (ServerFilterPhase c : ServerFilterPhase.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ServerFilterPhase 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
-
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
-
-