Interface MessageCondition<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      Tcombine​(T other)
      Define the rules for combining this condition with another.
      intcompareTo​(T other, Message<?> message)
      Compare this condition to another in the context of a specific message.
      TgetMatchingCondition​(Message<?> message)
      Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message.
    • Method Detail

      • combine

        T combine​(T other)
        Define the rules for combining this condition with another. For example combining type- and method-level conditions.
        Parameters:
        other - the condition to combine with
        Returns:
        the resulting message condition
      • getMatchingCondition

        T getMatchingCondition​(Message<?> message)
        Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message. For example a condition with destination patterns might return a new condition with sorted, matching patterns only.
        Returns:
        a condition instance in case of a match; or null if there is no match.
      • compareTo

        int compareTo​(T other,
                      Message<?> message)
        Compare this condition to another in the context of a specific message. It is assumed both instances have been obtained via getMatchingCondition(Message) to ensure they have content relevant to current message only.