Package org.apache.camel
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 thematchesReturningFailureMessage(org.apache.camel.Exchange)
method which evaluates and returns a detailed failure message if the predicate did not match.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Expression
getLeft()
Gets the left hand side expressionString
getOperator()
Gets the operatorExpression
getRight()
Gets the right hand side expressionString
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
init, initPredicate, 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.
-
-