org.jboss.messaging.core
Interface Filter

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Selector, ServerConsumerEndpoint

public interface Filter
extends java.io.Serializable

A filter encapsulates the logic of whether to accept a message or not. Filters are used when browsing to restrict the messages browsed, or when routing messages. A filter must be serializable because it can be sent between two address spaces as argument of a distributed RPC.

Version:
$Revision: 886 $ $Id: Filter.java 886 2006-04-13 08:57:49Z timfox $
Author:
Tim Fox, Ovidiu Feodorov

Method Summary
 boolean accept(Routable routable)
          Tests whether the routable should be accepted.
 

Method Detail

accept

public boolean accept(Routable routable)
Tests whether the routable should be accepted.

Returns:
true if the Filter accepts the routable - i.e. let's it pass.


Copyright © 2006 JBoss Inc. All Rights Reserved.