Enum Class ServerFilterPhase

java.lang.Object
java.lang.Enum<ServerFilterPhase>
io.micronaut.http.filter.ServerFilterPhase
All Implemented Interfaces:
Serializable, Comparable<ServerFilterPhase>, Constable

public enum ServerFilterPhase extends 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 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
  • Enum Constant Details

    • 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 Details

    • values

      public static ServerFilterPhase[] 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

      public static ServerFilterPhase valueOf(String name)
      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 name
      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