org.mule.expression
Class FunctionExpressionEvaluator

java.lang.Object
  extended by 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 -


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


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.