org.mule.expression
Class MuleContextExpressionEvaluator

java.lang.Object
  extended by org.mule.expression.MuleContextExpressionEvaluator
All Implemented Interfaces:
ExpressionEvaluator, NamedObject

public class MuleContextExpressionEvaluator
extends Object
implements ExpressionEvaluator

This property extractor exposes mule context information as expressions. This can be context information about the server itself such as the server id or about the current request such as the current service name.


Field Summary
static String NAME
           
 
Constructor Summary
MuleContextExpressionEvaluator()
           
 
Method Summary
 Object evaluate(String expression, MuleMessage message)
          Extracts a single property from the message
protected  MuleEventContext getEventContext()
           
protected  MuleContext getMuleContext()
           
 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
Constructor Detail

MuleContextExpressionEvaluator

public MuleContextExpressionEvaluator()
Method Detail

evaluate

public Object evaluate(String expression,
                       MuleMessage message)
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

getMuleContext

protected MuleContext getMuleContext()

getEventContext

protected MuleEventContext getEventContext()

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-2009 MuleSource, Inc.. All Rights Reserved.