Interface MessageRule

All Superinterfaces:
Rule<Message>, Serializable
All Known Implementing Classes:
AbstractMessageRule, ChoiceElementsRespectedRule, ConformanceProfileRule, OnlyAllowableSegmentsInSuperstructureRule, OnlyKnownSegmentsRule, PredicateMessageRule, TerserMessageRule, VisitorMessageRule, WrongVersionRule

public interface MessageRule extends Rule<Message>
A validation rule that applies to a fully populated message object. Message rules may be called (depending on runtime configuration) just after an inbound message is parsed, or just before an outbound message is encoded.
Author:
Bryan Tripp
  • Method Details

    • test

      Tests the given (fully populated) message against the criteria defined by this rule class.
      Parameters:
      msg - message to be tested
      Returns:
      a list of exceptions indicating points at which the given message failed to validate (empty if validation succeeds; may not be a complete list as testing may be aborted after failure). The list should be empty if this rule is evaluated against a type of message to which it doesn't apply.