org.apache.servicemix.expression
Class PropertyExpression

java.lang.Object
  extended by org.apache.servicemix.expression.PropertyExpression
All Implemented Interfaces:
Expression
Direct Known Subclasses:
FileExtensionPropertyExpression

public class PropertyExpression
extends java.lang.Object
implements Expression

A simple expression which returns the value of a property on the message.

Version:
$Revision: 451186 $

Constructor Summary
PropertyExpression()
           
PropertyExpression(java.lang.String property)
           
PropertyExpression(java.lang.String property, java.lang.Object defaultValue)
           
 
Method Summary
 java.lang.Object evaluate(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage message)
          Evaluates the expression on the given exchange and message.
 java.lang.Object getDefaultValue()
           
 java.lang.String getProperty()
           
 void setDefaultValue(java.lang.Object defaultValue)
           
 void setProperty(java.lang.String property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyExpression

public PropertyExpression()

PropertyExpression

public PropertyExpression(java.lang.String property)

PropertyExpression

public PropertyExpression(java.lang.String property,
                          java.lang.Object defaultValue)
Method Detail

getDefaultValue

public java.lang.Object getDefaultValue()
Returns:
the defaultValue

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)
Parameters:
defaultValue - the defaultValue to set

getProperty

public java.lang.String getProperty()
Returns:
the property

setProperty

public void setProperty(java.lang.String property)
Parameters:
property - the property to set

evaluate

public java.lang.Object evaluate(javax.jbi.messaging.MessageExchange exchange,
                                 javax.jbi.messaging.NormalizedMessage message)
                          throws javax.jbi.messaging.MessagingException
Description copied from interface: Expression
Evaluates the expression on the given exchange and message.

Specified by:
evaluate in interface Expression
Parameters:
exchange - the message exchange
message - the message, typically an inbound message
Returns:
the value of the expression
Throws:
javax.jbi.messaging.MessagingException


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.