KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > BusEvent


1 package org.objectweb.celtix;
2
3 import java.util.*;
4
5
6 /**
7  * Base class for all the Bus Events.
8  */

9 public class BusEvent extends EventObject {
10     /**
11      * Constant used for generic Bus Event ID.
12      */

13     public static final String JavaDoc BUS_EVENT = "org.objectweb.celtix.bus.event";
14
15     private String JavaDoc eventId;
16
17     /**
18      * Constructs a <code>BusEvent</code> with the event source and a unique event id.
19      * This id is used for querying for the events.
20      * @param source The <code>Object</code> representing the event information.
21      * @param id A string containing the event id.
22      */

23     public BusEvent(Object JavaDoc source, String JavaDoc id) {
24         super(source);
25         eventId = id;
26     }
27
28     /**
29      * Returns the unique event id for this particular bus event.
30      * @return String The event id.
31      */

32     public String JavaDoc getID() {
33         return eventId;
34     }
35 }
36
Popular Tags