org.apache.camel.impl
Class ExpressionSupport
java.lang.Object
org.apache.camel.impl.ExpressionSupport
- All Implemented Interfaces:
- Expression, Predicate
- Direct Known Subclasses:
- ExpressionAdapter
public abstract class ExpressionSupport
- extends Object
- implements Expression, Predicate
A useful base class for Predicate
and Expression
implementations
- Version:
- $Revision: 743330 $
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(Exchange 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
- Parameters:
exchange
- the message exchange
- Returns:
- true if the predicate matches
evaluate
public <T> T evaluate(Exchange exchange,
Class<T> type)
- Description copied from interface:
Expression
- Returns the value of the expression on the given exchange
- Specified by:
evaluate
in interface Expression
- Parameters:
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation result
- Returns:
- the value of the expression
assertMatches
public void assertMatches(String text,
Exchange exchange)
assertionFailureMessage
protected abstract String assertionFailureMessage(Exchange exchange)
Copyright © 2009 Apache Software Foundation. All Rights Reserved.