1. /*
  2. * @(#)NotificationEmitter.java 1.13 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management;
  8. /**
  9. * <p>Interface implemented by an MBean that emits Notifications. It
  10. * allows a listener to be registered with the MBean as a notification
  11. * listener.</p>
  12. *
  13. * <p>This interface should be used by new code in preference to the
  14. * {@link NotificationBroadcaster} interface.</p>
  15. *
  16. * @since 1.5
  17. * @since.unbundled JMX 1.2
  18. */
  19. public interface NotificationEmitter extends NotificationBroadcaster {
  20. /**
  21. * <p>Removes a listener from this MBean. The MBean must have a
  22. * listener that exactly matches the given <code>listener</code>,
  23. * <code>filter</code>, and <code>handback</code> parameters. If
  24. * there is more than one such listener, only one is removed.</p>
  25. *
  26. * <p>The <code>filter</code> and <code>handback</code> parameters
  27. * may be null if and only if they are null in a listener to be
  28. * removed.</p>
  29. *
  30. * @param listener A listener that was previously added to this
  31. * MBean.
  32. * @param filter The filter that was specified when the listener
  33. * was added.
  34. * @param handback The handback that was specified when the listener was
  35. * added.
  36. *
  37. * @exception ListenerNotFoundException The listener is not
  38. * registered with the MBean, or it is not registered with the
  39. * given filter and handback.
  40. */
  41. public void removeNotificationListener(NotificationListener listener,
  42. NotificationFilter filter,
  43. Object handback)
  44. throws ListenerNotFoundException;
  45. }