org.mule.routing.filters
Class MessagePropertyFilter

java.lang.Object
  extended byorg.mule.routing.filters.MessageFilter
      extended byorg.mule.routing.filters.MessagePropertyFilter
All Implemented Interfaces:
UMOFilter

public class MessagePropertyFilter
extends MessageFilter

MessagePropertyFilter can be used to filter against properties on an event. This can be very useful as the event properties represent all the meta information about the evnet from the underlying transport, so for an event received over Http you can check for Http Headers or For Jms you can check for Jms Headers. The pattern should be expresed as a key/value pair i.e. propertyName=value If you want to compare more than one property you can use the logic filters for And, Or and Not expressions. By default the comparison is case sensitive you you can sent the caseSensitive property to override this.

Version:
$Revision: 1.2 $
Author:
Ross Mason

Constructor Summary
MessagePropertyFilter()
           
MessagePropertyFilter(java.lang.String expression)
           
 
Method Summary
 boolean accept(UMOMessage message)
           
protected  boolean compare(java.lang.String value1, java.lang.String value2)
           
 java.lang.String getExpression()
           
 boolean isCaseSensitive()
           
 void setCaseSensitive(boolean caseSensitive)
           
 void setExpression(java.lang.String expression)
           
 
Methods inherited from class org.mule.routing.filters.MessageFilter
accept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagePropertyFilter

public MessagePropertyFilter()

MessagePropertyFilter

public MessagePropertyFilter(java.lang.String expression)
Method Detail

accept

public boolean accept(UMOMessage message)
Specified by:
accept in class MessageFilter

compare

protected boolean compare(java.lang.String value1,
                          java.lang.String value2)

getExpression

public java.lang.String getExpression()

setExpression

public void setExpression(java.lang.String expression)

isCaseSensitive

public boolean isCaseSensitive()

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.