Package org.apache.camel
Interface BinaryPredicate
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptiongetLeft()
Gets the left hand side expressionGets the operatorgetRight()
Gets the right hand side expressionmatchesReturningFailureMessage
(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 Details
-
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
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.
-