Package org.mockserver.model
Enum Class FailurePolicy
- All Implemented Interfaces:
Serializable,Comparable<FailurePolicy>,Constable
Controls what happens to an expectation's primary response when a blocking
before-action fails or times out.
FAIL_FAST— abort the primary action and return an error response to the client (the downstream side-effect is treated as a precondition for responding).BEST_EFFORT— log the failure and continue to the primary action anyway (the side-effect is advisory).
Only meaningful for before-actions; ignored by after-actions, which are always fire-and-forget and run after the response has been written.
-
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 FailurePolicyReturns the enum constant of this class with the specified name.static FailurePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FAIL_FAST
-
BEST_EFFORT
-
-
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
-