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

搜索引擎

开发平台:

Java

  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. /* project imports */
  8. import net.javacoding.jspider.api.event.JSpiderEvent;
  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.1.1.1 2002/11/20 17:02:32 vanrogu Exp $
  21.  *
  22.  * @author G黱ther Van Roey (gunther@javacoding.net)
  23.  * @version $Revision: 1.1.1.1 $ $Date: 2002/11/20 17:02:32 $ $Name:  $
  24.  */
  25. public interface EventFilter {
  26.     /**
  27.      * Method that will filter an events and tells the dispatcher whether we're
  28.      * interested in it or not.  Returns true if the event must be dispatched,
  29.      * false if it can be ignored.
  30.      * @param event - the JSpider event the be filtered
  31.      * @return boolean value telling whether to dispatch the event or not
  32.      */
  33.     public boolean filterEvent(JSpiderEvent event);
  34. }