01: package org.objectweb.celtix;
02:
03: import java.util.*;
04:
05: /**
06: * Base class for all the Bus Events.
07: */
08: public class BusEvent extends EventObject {
09: /**
10: * Constant used for generic Bus Event ID.
11: */
12: public static final String BUS_EVENT = "org.objectweb.celtix.bus.event";
13:
14: private String eventId;
15:
16: /**
17: * Constructs a <code>BusEvent</code> with the event source and a unique event id.
18: * This id is used for querying for the events.
19: * @param source The <code>Object</code> representing the event information.
20: * @param id A string containing the event id.
21: */
22: public BusEvent(Object source, String id) {
23: super (source);
24: eventId = id;
25: }
26:
27: /**
28: * Returns the unique event id for this particular bus event.
29: * @return String The event id.
30: */
31: public String getID() {
32: return eventId;
33: }
34: }
|