1 /* 2 * $Id: ExpressionEvaluator.java 22048 2011-05-31 14:39:03Z dfeist $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.api.expression; 12 13 import org.mule.api.MuleMessage; 14 import org.mule.api.NameableObject; 15 16 /** 17 * <code>ExpressionEvaluator</code> extracts a property from the message in a generic 18 * way. i.e. composite properties can be pulled and aggregated depending on this 19 * strategy. This can be used to extract Correlation Ids, Message Ids etc. 20 * 21 * These objects are used to execute property expressions (usually on the 22 * current message) at runtime to extracta dynamic value. 23 */ 24 public interface ExpressionEvaluator extends NameableObject 25 { 26 /** 27 * Extracts a single property from the message 28 * 29 * @param expression the property expression or expression 30 * @param message the message to extract from 31 * @return the result of the extraction or null if the property was not found 32 */ 33 Object evaluate(String expression, MuleMessage message); 34 35 }