org.jboss.messaging.core.filter.impl
Class FilterImpl

java.lang.Object
  extended by org.jboss.messaging.core.filter.impl.FilterImpl
All Implemented Interfaces:
Filter

public class FilterImpl
extends java.lang.Object
implements Filter

This class implements a JBoss Messaging filter

Version:
$Revision: 3569 $ $Id: Selector.java 3569 2008-01-15 21:14:04Z timfox $
Author:
Tim Fox, Jeff Mesnil JBM filters have the same syntax as JMS 1.1 selectors, but the identifiers are different. Valid identifiers that can be used are: JBMessageID - the message id of the message JBMPriority - the priority of the message JBMTimestamp - the timestamp of the message JBMDurable - "DURABLE" or "NON_DURABLE" JBMExpiration - the expiration of the message JBMSize - the encoded size of the full message in bytes Any other identifers that appear in a filter expression represent header values for the message String values must be set as SimpleString, not java.lang.String (see JBMESSAGING-1307). Derived from JBoss MQ version by, Norbert Lataille, Juha Lindfors, Jason Dillon, Scott Stark, Tim Fox

Constructor Summary
FilterImpl(SimpleString str)
           
 
Method Summary
static Filter createFilter(java.lang.String filterStr)
           
 SimpleString getFilterString()
           
 boolean match(ServerMessage message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterImpl

public FilterImpl(SimpleString str)
           throws MessagingException
Throws:
MessagingException
Method Detail

createFilter

public static Filter createFilter(java.lang.String filterStr)
                           throws MessagingException
Returns:
null if filterStr is null or a valid filter else
Throws:
MessagingException - if the string does not correspond to a valid filter

getFilterString

public SimpleString getFilterString()
Specified by:
getFilterString in interface Filter

match

public boolean match(ServerMessage message)
Specified by:
match in interface Filter


Copyright © 2006 JBoss Inc. All Rights Reserved.