FunctionExpressionEvaluator (Mule ESB 2.2.1 API)
Keywords: org.mule.expression.FunctionExpressionEvaluator 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 FunctionExpressionEvaluator

    java.lang.Object
      org.mule.expression.FunctionExpressionEvaluator

All Implemented Interfaces:
  ExpressionEvaluator, NamedObject

    public class FunctionExpressionEvaluator

extends Object
implements ExpressionEvaluator

This property extractor doesn't actually extract a property from the message, instead it allows for certain functions to be called and returns a result. The functions it supports are -

- now - returns an `Timestamp` with the current time.
- date - returns a `Date` with the current time.
- dateStamp - returns a `String` that contains the current date formatted according to `DEFAULT_DATE_FORMAT`.
- dateStamp(dd-MM-yyyy) - returns a `String` that contains the current date formatted according to the format passed into the function.
- uuid - returns a globally unique identifier
- hostname - returns the hostname of the machine Mule is running on
- ip - returns the ip address of the machine Mule is running on
- count - returns a local count that will increment for each call. If the server is re-started the counter will return to zero
- payloadClass - Returns a fuly qualified class name of the payload as a string
- shortPayloadClass - Returns just the class name of the payload as a string

Field Summary
`static String` | `COUNT_FUNCTION`
`static String` | `DATE_FUNCTION`
`static String` | `DATESTAMP_FUNCTION`
`static String` | `DEFAULT_DATE_FORMAT`
`static String` | `HOSTNAME_FUNCTION`
`static String` | `IP_FUNCTION`
`static String` | `NAME`
`static String` | `NOW_FUNCTION`
`static String` | `PAYLOAD_CLASS_FUNCTION`
`static String` | `SHORT_PAYLOAD_CLASS_FUNCTION`
`static String` | `SYSTIME_FUNCTION`
`static String` | `UUID_FUNCTION`

Constructor Summary
`FunctionExpressionEvaluator()`

Method Summary
`Object` | `evaluate(String name, MuleMessage message)` Extracts a single property from the message
`String` | `getName()` Gts 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

### DEFAULT_DATE_FORMAT

    public static final String DEFAULT_DATE_FORMAT

See Also:
  Constant Field Values

### NOW_FUNCTION

    public static final String NOW_FUNCTION

See Also:
  Constant Field Values

### DATE_FUNCTION

    public static final String DATE_FUNCTION

See Also:
  Constant Field Values

### DATESTAMP_FUNCTION

    public static final String DATESTAMP_FUNCTION

See Also:
  Constant Field Values

### SYSTIME_FUNCTION

    public static final String SYSTIME_FUNCTION

See Also:
  Constant Field Values

### UUID_FUNCTION

    public static final String UUID_FUNCTION

See Also:
  Constant Field Values

### HOSTNAME_FUNCTION

    public static final String HOSTNAME_FUNCTION

See Also:
  Constant Field Values

### IP_FUNCTION

    public static final String IP_FUNCTION

See Also:
  Constant Field Values

### COUNT_FUNCTION

    public static final String COUNT_FUNCTION

See Also:
  Constant Field Values

### PAYLOAD_CLASS_FUNCTION

    public static final String PAYLOAD_CLASS_FUNCTION

See Also:
  Constant Field Values

### SHORT_PAYLOAD_CLASS_FUNCTION

    public static final String SHORT_PAYLOAD_CLASS_FUNCTION

See Also:
  Constant Field Values

Constructor Detail

### FunctionExpressionEvaluator

    public FunctionExpressionEvaluator()

Method Detail

### evaluate

    public Object evaluate(String name,
                           MuleMessage message)

  Description copied from interface: `ExpressionEvaluator`
  Extracts a single property from the message

  Specified by:
    `evaluate` in interface `ExpressionEvaluator`
  Parameters:
    `name` - 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()

  Gts 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.