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 Ernst Bunders
13: * @since MMBase-1.8
14: * @version $Id: NodeEventBroker.java,v 1.16 2007/07/26 11:45:54 michiel Exp $
15: */
16: public class NodeEventBroker extends AbstractEventBroker {
17:
18: /*
19: * (non-Javadoc)
20: *
21: * @see event.AbstractEventBroker#canBrokerFor(java.lang.Class)
22: */
23: public boolean canBrokerForListener(EventListener listener) {
24: return listener instanceof NodeEventListener;
25: }
26:
27: /*
28: * (non-Javadoc)
29: *
30: * @see event.AbstractEventBroker#shouldNotifyForEvent(event.Event)
31: */
32: public boolean canBrokerForEvent(Event event) {
33: return event instanceof NodeEvent;
34: }
35:
36: /*
37: * (non-Javadoc)
38: *
39: * @see event.AbstractEventBroker#notifyEventListeners()
40: */
41: protected void notifyEventListener(Event event,
42: EventListener listener) {
43: NodeEvent ne = (NodeEvent) event; //!!!!!
44: NodeEventListener nel = (NodeEventListener) listener;
45: nel.notify(ne);
46: }
47:
48: /* (non-Javadoc)
49: * @see org.mmbase.core.event.AbstractEventBroker#toString()
50: */
51: public String toString() {
52: return "NodeEvent Broker";
53: }
54:
55: }
|