EventFilter.java
上传用户:qing5858
上传日期:2015-10-27
资源大小:6056k
文件大小:1k
源码类别:

搜索引擎

开发平台:

Java

  1. package net.javacoding.jspider.spi;
  2. /* project imports */
  3. import net.javacoding.jspider.api.event.JSpiderEvent;
  4. /**
  5.  * Interface that will be implemented upon a component in a JSpider module that
  6.  * allows to filter JSpider event coming from the engine.
  7.  *
  8.  * <p>
  9.  * This can be handy, for instance, if you're writing a module that checks all
  10.  * error conditions on a server.  In that case, you would not be interested in
  11.  * the HTTP statuses 2xx, but you would definitely want to receive
  12.  * notifications about 4xx and 5xx states.
  13.  * </p>
  14.  *
  15.  * $Id: EventFilter.java,v 1.2 2003/04/25 21:29:06 vanrogu Exp $
  16.  *
  17.  * @author G黱ther Van Roey (gunther@javacoding.net)
  18.  * @version $Revision: 1.2 $ $Date: 2003/04/25 21:29:06 $ $Name:  $
  19.  */
  20. public interface EventFilter {
  21.     /**
  22.      * Method that will filter an events and tells the dispatcher whether we're
  23.      * interested in it or not.  Returns true if the event must be dispatched,
  24.      * false if it can be ignored.
  25.      * @param event - the JSpider event to be filtered
  26.      * @return boolean value telling whether to dispatch the event or not
  27.      */
  28.     public boolean filterEvent(JSpiderEvent event);
  29. }