Interface BinaryPredicate

  • All Superinterfaces:
    Predicate

    public interface BinaryPredicate
    extends Predicate
    A predicate which evaluates a binary expression.

    The predicate has a left and right hand side expressions which is matched based on an operator.

    This predicate offers the matchesReturningFailureMessage(org.apache.camel.Exchange) method which evaluates and returns a detailed failure message if the predicate did not match.

    • Method Detail

      • getOperator

        String getOperator()
        Gets the operator
        Returns:
        the operator text
      • getLeft

        Expression getLeft()
        Gets the left hand side expression
        Returns:
        the left expression
      • getRight

        Expression getRight()
        Gets the right hand side expression
        Returns:
        the right expression
      • matchesReturningFailureMessage

        String matchesReturningFailureMessage​(Exchange exchange)
        Evaluates the predicate on the message exchange and returns null if this exchange matches the predicate. If it did not match, then a failure message is returned detailing the reason, which can be used by end users to understand the failure.
        Parameters:
        exchange - the message exchange
        Returns:
        null if the predicate matches.