org.mule.expression
Class MuleContextExpressionEvaluator
java.lang.Object
org.mule.expression.MuleContextExpressionEvaluator
- All Implemented Interfaces:
- MuleContextAware, ExpressionEvaluator, NamedObject
public class MuleContextExpressionEvaluator
- extends Object
- implements ExpressionEvaluator, MuleContextAware
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.
- serviceName - returns the name of the service currently processing the event.
- modelName - returns the name of the model that hosts the current service
- inboundEndpoint - returns the URI string of the endpoint that received the current messgae.
- serverId - the Mule instance server Id.
- clusterId - the Mule instance cluster Id.
- domainId - the Mule instance domain Id.
- workingDir - Mule's working directory.
- homeDir - Mule's home directory
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
muleContext
protected MuleContext muleContext
MuleContextExpressionEvaluator
public MuleContextExpressionEvaluator()
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext
in interface MuleContextAware
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 expressionmessage
- 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
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.