org.apache.camel.language.bean
Class BeanExpression<E extends Exchange>

java.lang.Object
  extended by org.apache.camel.impl.ExpressionSupport<E>
      extended by org.apache.camel.language.bean.BeanExpression<E>
All Implemented Interfaces:
Expression<E>, Predicate<E>

public class BeanExpression<E extends Exchange>
extends ExpressionSupport<E>

Evaluates an expression using a bean method invocation

Version:
$Revision: 47154 $

Constructor Summary
BeanExpression(Object bean, String method)
           
BeanExpression(String beanName, String method)
           
 
Method Summary
protected  String assertionFailureMessage(E exchange)
           
 Object evaluate(E exchange)
          Returns the value of the expression on the given exchange
 String toString()
           
 
Methods inherited from class org.apache.camel.impl.ExpressionSupport
assertMatches, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanExpression

public BeanExpression(Object bean,
                      String method)

BeanExpression

public BeanExpression(String beanName,
                      String method)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

assertionFailureMessage

protected String assertionFailureMessage(E exchange)
Specified by:
assertionFailureMessage in class ExpressionSupport<E extends Exchange>

evaluate

public Object evaluate(E exchange)
Description copied from interface: Expression
Returns the value of the expression on the given exchange

Parameters:
exchange - the message exchange on which to evaluate the expression
Returns:
the value of the expression


Copyright © 2009 IONA Open Source Community. All Rights Reserved.