KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > innig > macker > event > MackerEventListener


1 /*______________________________________________________________________________
2  *
3  * Macker http://innig.net/macker/
4  *
5  * Copyright 2002-2003 Paul Cantrell
6  *
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License version 2, as published by the
9  * Free Software Foundation. See the file LICENSE.html for more information.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the license for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
17  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
18  *______________________________________________________________________________
19  */

20  
21 package net.innig.macker.event;
22
23 import net.innig.macker.rule.RuleSet;
24
25 import java.util.*;
26
27 public interface MackerEventListener
28     extends EventListener
29     {
30     /** Called before rule checking begins for the given ruleset.
31      */

32     public void mackerStarted(RuleSet ruleSet)
33         throws ListenerException;
34     
35     /** Called after rule checking has finished for the given ruleset.
36      */

37     public void mackerFinished(RuleSet ruleSet)
38         throws MackerIsMadException, ListenerException;
39     
40     /** Called after an exception has aborted rule checking for the given ruleset.
41      * <b>??</b>: Is mackerAborted called if mackerFinished() was already called, but
42      * another listener subsequently aborted?
43      */

44     public void mackerAborted(RuleSet ruleSet);
45     
46     /** Handles Macker's irrational anger.
47      */

48     public void handleMackerEvent(RuleSet ruleSet, MackerEvent event)
49         throws MackerIsMadException, ListenerException;
50     }
51
Popular Tags