org.jboss.jms.server.selector
Class Selector

java.lang.Object
  extended by org.jboss.jms.server.selector.Selector
All Implemented Interfaces:
Filter

public class Selector
extends java.lang.Object
implements Filter

This class implements a Message Selector.

Version:
$Revision: 3168 $ $Id: Selector.java 3168 2007-10-03 02:34:11Z clebert.suconic@jboss.com $
Author:
Norbert Lataille, Juha Lindfors, Jason Dillon, Scott Stark, Tim Fox

Field Summary
 java.util.HashMap identifiers
           
 java.lang.Object result
           
 java.lang.String selector
           
 
Constructor Summary
Selector(java.lang.String sel)
           
 
Method Summary
 boolean accept(Message message)
          Tests whether the message should be accepted.
 java.lang.String getExpression()
           
 java.lang.String getFilterString()
          Return the string representation of the selector
static java.lang.Class getSelectorParserClass()
          Get the class that implements the ISelectorParser interface to be used by Selector instances.
static void setSelectorParserClass(java.lang.Class parserClass)
          Set the class that implements the ISelectorParser interface to be used by Selector instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selector

public java.lang.String selector

identifiers

public java.util.HashMap identifiers

result

public java.lang.Object result
Constructor Detail

Selector

public Selector(java.lang.String sel)
         throws InvalidSelectorException
Throws:
InvalidSelectorException
Method Detail

getFilterString

public java.lang.String getFilterString()
Return the string representation of the selector

Specified by:
getFilterString in interface Filter

getSelectorParserClass

public static java.lang.Class getSelectorParserClass()
Get the class that implements the ISelectorParser interface to be used by Selector instances.


setSelectorParserClass

public static void setSelectorParserClass(java.lang.Class parserClass)
Set the class that implements the ISelectorParser interface to be used by Selector instances.

Parameters:
parserClass - the ISelectorParser implementation. This must have a public no-arg constructor.

getExpression

public java.lang.String getExpression()

accept

public boolean accept(Message message)
Description copied from interface: Filter
Tests whether the message should be accepted.

Specified by:
accept in interface Filter
Returns:
true if the Filter accepts the message - i.e. let's it pass.


Copyright © 2006 JBoss Inc. All Rights Reserved.