org.apache.camel
Interface BinaryPredicate

All Superinterfaces:
Predicate
All Known Implementing Classes:
BinaryPredicateSupport, TimeClause

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.

Version:

Method Summary
 Expression getLeft()
          Gets the left hand side expression
 String getOperator()
          Gets the operator
 Expression getRight()
          Gets the right hand side expression
 String matchesReturningFailureMessage(Exchange exchange)
          Evaluates the predicate on the message exchange and returns null if this exchange matches the predicate.
 
Methods inherited from interface org.apache.camel.Predicate
matches
 

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.


Apache CAMEL