org.mule.expression
Class MessagePayloadExpressionEvaluator
java.lang.Object
org.mule.expression.MessagePayloadExpressionEvaluator
- All Implemented Interfaces:
- MuleContextAware, ExpressionEvaluator, NamedObject
public class MessagePayloadExpressionEvaluator
- extends Object
- implements ExpressionEvaluator, MuleContextAware
Returns the message payload. If the expression is set to a class name then Mule will attempt to transform the payload by
discovering the correct transformer(s) in the registry. This is only suited for simple transformations between common types.
#[payload:byte[]]
or
#[payload:org.mule.api.OutputHandler]
If the object passed in is not a MuleMessage, the same object will be returned.
- See Also:
ExpressionEvaluator
,
DefaultExpressionManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- See Also:
- Constant Field Values
BYTE_ARRAY
public static final String BYTE_ARRAY
- See Also:
- Constant Field Values
logger
protected final transient Log logger
- logger used by this class
muleContext
protected MuleContext muleContext
MessagePayloadExpressionEvaluator
public MessagePayloadExpressionEvaluator()
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext
in interface MuleContextAware
evaluate
public Object evaluate(String expression,
MuleMessage message)
- Description copied from interface:
ExpressionEvaluator
- Extracts a single property from the message
- Specified by:
evaluate
in interface ExpressionEvaluator
- Parameters:
expression
- the property expression or expressionmessage
- the message to extract from
- Returns:
- the result of the extraction or null if the property was not found
getName
public String getName()
- Gets the name of the object
- Specified by:
getName
in interface NamedObject
- Returns:
- the name of the object
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.