MessageExpressionEvaluator (Mule ESB 2.2.1 API)
Keywords: org.mule.expression.MessageExpressionEvaluator class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.expression
Class MessageExpressionEvaluator

    java.lang.Object
      org.mule.expression.MessageExpressionEvaluator

All Implemented Interfaces:
  ExpressionEvaluator, NamedObject

    public class MessageExpressionEvaluator

extends Object
implements ExpressionEvaluator

Returns properties on the MuleMessage itself. The supported expressions map directly to methods on the message. For example:

- id - returns the value of `MessageAdapter.getUniqueId()`
- correlationId - returns the value of `MessageAdapter.getCorrelationId()`
- correlationGroupSize - returns the value of `MessageAdapter.getCorrelationGroupSize()`
- correlationSequence - returns the value of `MessageAdapter.getCorrelationSequence()`
- replyTo - returns the value of `MessageAdapter.getReplyTo()`
- payload - returns the value of `MessageAdapter.getPayload()`
- encoding - returns the value of `MessageAdapter.getEncoding()`
- exception - returns the value of `org.mule.api.MuleMessage#getExceptionPayload().getException()` or null if there is no exception payload

If no expression is set the MuleMessage itself will be returned.

If the object passed in is not a MuleMessage, the same object will be returned.

See Also:
  `ExpressionEvaluator`, `DefaultExpressionManager`

Field Summary
`protected Log` | `logger` logger used by this class
`static String` | `NAME`

Constructor Summary
`MessageExpressionEvaluator()`

Method Summary
`Object` | `evaluate(String expression, MuleMessage message)` Extracts a single property from the message
`String` | `getName()` Gets the name of the object
`void` | `setName(String name)` Sets the name of the object

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final String NAME

See Also:
  Constant Field Values

### logger

    protected final transient Log logger

  logger used by this class

Constructor Detail

### MessageExpressionEvaluator

    public MessageExpressionEvaluator()

Method Detail

### 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 expression
    `message` - 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

### setName

    public void setName(String name)

  Sets the name of the object

  Specified by:
    `setName` in interface `NamedObject`
  Parameters:
    `name` - the name of the object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.