Enum Class PreemptionRequest.Mode

java.lang.Object
java.lang.Enum<PreemptionRequest.Mode>
org.mockserver.model.PreemptionRequest.Mode
All Implemented Interfaces:
Serializable, Comparable<PreemptionRequest.Mode>, Constable
Enclosing class:
PreemptionRequest

public static enum PreemptionRequest.Mode extends Enum<PreemptionRequest.Mode>
How new exchanges arriving while cordoned are turned away, and how HTTP/2 clients are told to drain.
  • reject503 — reject new HTTP/1.1 and HTTP/2 exchanges with 503 + Retry-After + Connection: close (no GOAWAY).
  • goaway — emit an HTTP/2 GOAWAY so clients stop opening streams; HTTP/1.1 has no GOAWAY so it still degrades to a 503 close.
  • both — reject new exchanges with 503 and emit GOAWAY on HTTP/2.
  • Enum Constant Details

  • Method Details

    • values

      public static PreemptionRequest.Mode[] 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 PreemptionRequest.Mode 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