01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package javax.management;
10:
11: /**
12: * Although not deprecated, this interface should not be used since JMX 1.2; use
13: * {@link NotificationEmitter} instead.
14: *
15: * @version $Revision: 1.8 $
16: * @see Notification
17: */
18: public interface NotificationBroadcaster {
19: /**
20: * Returns the metadata information associated with this emitter.
21: */
22: public MBeanNotificationInfo[] getNotificationInfo();
23:
24: /**
25: * Adds a notification listener to this emitter.
26: *
27: * @param listener The notification listener which will handle the notifications emitted.
28: * @param filter Filters notifications that the listener should receive; may be null, if no filtering is required.
29: * @param handback An opaque object to be sent back to the listener when a notification is emitted.
30: * @see #removeNotificationListener(NotificationListener)
31: */
32: public void addNotificationListener(NotificationListener listener,
33: NotificationFilter filter, Object handback)
34: throws IllegalArgumentException;
35:
36: /**
37: * Removes a notification listener from this emitter.
38: * If the listener has been registered with different handback objects or notification filters,
39: * all entries corresponding to the listener will be removed.
40: *
41: * @param listener The notification listener that was previously added to this emitter.
42: * @throws ListenerNotFoundException If the listener is not registered with the emitter.
43: * @see #addNotificationListener(NotificationListener, NotificationFilter, Object)
44: */
45: public void removeNotificationListener(NotificationListener listener)
46: throws ListenerNotFoundException;
47: }
|