*
* @param headerName the name of the header the expression will return
* @return an expression object which will return the header value
*/
public static Expression headerExpression(final String headerName) {
return new ExpressionAdapter() {
public Object evaluate(Exchange exchange) {
Object header = exchange.getIn().getHeader(headerName);
if (header == null) {
// fall back on a property
header = exchange.getProperty(headerName);