1   /*
2    * $Id: TestListener.java,v 1.1 2004/03/18 15:21:54 johndavidtaylor Exp $
3    * Created on Feb 20, 2004 by John Taylor jdt@roe.ac.uk .
4   */
5   package org.abraracourcix.alipes.listeners;
6   import org.abraracourcix.alipes.common.Event;
7   /***
8    * A mock listener used for testing
9    * @author jdt 
10   */
11  public final class TestListener implements Listener {
12      /***
13       * If an event occurs we store it here
14       */
15      private Event event;
16      /***
17       * and the resource on which it occurred
18       */
19      private Object resource;
20      /***
21       * getter
22       * @return the event that occurred
23       */
24      public Event getEvent() {
25          return event;
26      }
27      /***
28       * getter
29       * @return the resource on which the event occurred
30       */
31      public Object getResource() {
32          return resource;
33      }
34      /***
35       * Called when an event occurs
36       * @param event the event
37       * @param resource the resource
38       * 
39       * @see org.abraracourcix.alipes.listeners.Listener#eventOccurred(org.abraracourcix.alipes.common.Event,
40       *      java.lang.Object)
41       */
42      public void eventOccurred(final Event event, final Object resource) {
43          this.event = event;
44          this.resource = resource;
45      }
46  }
47  /*
48   * $Log: TestListener.java,v $
49   * Revision 1.1  2004/03/18 15:21:54  johndavidtaylor
50   * Copied across from incubation in beanpeeler
51   *
52   * Revision 1.4  2004/03/14 18:49:15  johndavidtaylor
53   * corrected comments
54   *
55   * Revision 1.3  2004/03/11 16:35:47  johndavidtaylor
56   * brought up to standard
57   * Revision 1.2 2004/03/08 20:16:46 johndavidtaylor
58   * refactored to new package name
59   * 
60   * Revision 1.1 2004/03/08 19:58:26 johndavidtaylor Initial commit -transfer
61   * from previous repository
62   * 
63   * Revision 1.1 2004/03/02 23:04:37 jdt new
64   *  
65   */