KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > mod > api > EventFilter


1 /**
2  * This source is subject to the LGPL Open Source license. See the license
3  * file that came with the distribution, or visit http://www.opensource.org
4  * for more information.
5  */

6 package net.javacoding.jspider.mod.api;
7
8
9 /* project imports */
10
11 import net.javacoding.jspider.api.event.JSpiderEvent;
12
13
14 /**
15  * Interface that will be implemented upon a component in a JSpider module that
16  * allows to filter JSpider event coming from the engine.
17  *
18  * <p>
19  * This can be handy, for instance, if you're writing a module that checks all
20  * error conditions on a server. In that case, you would not be interested in
21  * the HTTP statuses 2xx, but you would definitely want to receive
22  * notifications about 4xx and 5xx states.
23  * </p>
24  *
25  * $Id: EventFilter.java,v 1.1.1.1 2002/11/20 17:02:32 vanrogu Exp $
26  *
27  * @author Günther Van Roey (gunther@javacoding.net)
28  * @version $Revision: 1.1.1.1 $ $Date: 2002/11/20 17:02:32 $ $Name: $
29  */

30 public interface EventFilter {
31
32     /**
33      * Method that will filter an events and tells the dispatcher whether we're
34      * interested in it or not. Returns true if the event must be dispatched,
35      * false if it can be ignored.
36      * @param event - the JSpider event the be filtered
37      * @return boolean value telling whether to dispatch the event or not
38      */

39     public boolean filterEvent(JSpiderEvent event);
40
41 }
42
Popular Tags