KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > spi > EventFilter


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

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

34     public boolean filterEvent(JSpiderEvent event);
35
36 }
37
Popular Tags