01: /*
02: * This software is OSI Certified Open Source Software.
03: * OSI Certified is a certification mark of the Open Source Initiative. The
04: * license (Mozilla version 1.0) can be read at the MMBase site. See
05: * http://www.MMBase.org/license
06: */
07: package org.mmbase.core.event;
08:
09: /**
10: * This class is the event broker implementation for the NodeEvent
11: *
12: * @author Michiel Meeuwissen
13: * @since MMBase-1.8
14: * @version $Id: IdEventBroker.java,v 1.3 2007/07/26 11:45:54 michiel Exp $
15: */
16: public class IdEventBroker extends AbstractEventBroker {
17:
18: // javadoc inherited
19: public boolean canBrokerForListener(EventListener listener) {
20: return listener instanceof IdEventListener;
21: }
22:
23: // javadoc inherited
24: public boolean canBrokerForEvent(Event event) {
25: return event instanceof IdEvent;
26: }
27:
28: /*
29: * (non-Javadoc)
30: *
31: * @see event.AbstractEventBroker#notifyEventListeners()
32: */
33: protected void notifyEventListener(Event event,
34: EventListener listener) {
35: IdEvent ne = (IdEvent) event; //!!!!!
36: IdEventListener nel = (IdEventListener) listener;
37: nel.notify(ne);
38: }
39:
40: /* (non-Javadoc)
41: * @see org.mmbase.core.event.AbstractEventBroker#toString()
42: */
43: public String toString() {
44: return "IdEvent Broker";
45: }
46:
47: }
|