Package org.mockserver.model
Enum Class PreemptionRequest.Mode
- All Implemented Interfaces:
Serializable,Comparable<PreemptionRequest.Mode>,Constable
- Enclosing class:
- PreemptionRequest
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic PreemptionRequest.ModeReturns the enum constant of this class with the specified name.static PreemptionRequest.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
reject503
-
goaway
-
both
-
-
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
-