Enum Class ValidationMode

java.lang.Object
java.lang.Enum<ValidationMode>
ch.nexsol.gateway.validation.ValidationMode
All Implemented Interfaces:
Serializable, Comparable<ValidationMode>, Constable

public enum ValidationMode extends Enum<ValidationMode>
What the filter does with a message that does not honour the contract, configured independently for the request and the response direction.
  • Enum Constant Details

    • OFF

      public static final ValidationMode OFF
      Do not validate this direction at all. No body is buffered, so the streaming behaviour of the gateway is left untouched.
    • REPORT

      public static final ValidationMode REPORT
      Validate and record the outcome, but forward the message unchanged. Use it to measure how far an existing traffic is from its contract before enforcing anything.
    • ENFORCE

      public static final ValidationMode ENFORCE
      Validate and reject a message that breaks the contract: 400 Bad Request for a request, 502 Bad Gateway for a response.
  • Method Details

    • values

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