org.apache.camel.impl
Class ExpressionSupport<E extends Exchange>
java.lang.Object
org.apache.camel.impl.ExpressionSupport<E>
- All Implemented Interfaces:
- Expression<E>, Predicate<E>
- Direct Known Subclasses:
- BeanExpression
public abstract class ExpressionSupport<E extends Exchange>
- extends Object
- implements Expression<E>, Predicate<E>
A useful base class for Predicate
and Expression
implementations
- Version:
- $Revision: 617 $
Method Summary |
protected abstract String |
assertionFailureMessage(E exchange)
|
void |
assertMatches(String text,
E exchange)
Allows this predicate to be used nicely in testing to generate a nicely
formatted exception and message if this predicate does not match for the
given exchange. |
boolean |
matches(E exchange)
Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionSupport
public ExpressionSupport()
matches
public boolean matches(E exchange)
- Description copied from interface:
Predicate
- Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
- Specified by:
matches
in interface Predicate<E extends Exchange>
- Parameters:
exchange
- the message exchange
- Returns:
- true if the predicate matches
assertMatches
public void assertMatches(String text,
E exchange)
- Description copied from interface:
Predicate
- Allows this predicate to be used nicely in testing to generate a nicely
formatted exception and message if this predicate does not match for the
given exchange.
- Specified by:
assertMatches
in interface Predicate<E extends Exchange>
- Parameters:
text
- the description to use in the exception messageexchange
- the exchange to evaluate the expression on
assertionFailureMessage
protected abstract String assertionFailureMessage(E exchange)
Copyright © 2009 IONA Open Source Community. All Rights Reserved.