1. /*
  2. * @(#)UnsolicitedNotificationListener.java 1.7 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.naming.ldap;
  8. import javax.naming.event.NamingListener;
  9. /**
  10. * This interface is for handling <tt>UnsolicitedNotificationEvent</tt>.
  11. * "Unsolicited notification" is defined in
  12. * <A HREF="ftp://ftp.isi.edu/in-notes/rfc2251.txt">RFC 2251</A>.
  13. * It allows the server to send unsolicited notifications to the client.
  14. * A <tt>UnsolicitedNotificationListener</tt> must:
  15. *<ol>
  16. * <li>Implement this interface and its method
  17. * <li>Implement <tt>NamingListener.namingExceptionThrown()</tt> so
  18. * that it will be notified of exceptions thrown while attempting to
  19. * collect unsolicited notification events.
  20. * <li>Register with the context using one of the <tt>addNamingListener()</tt>
  21. * methods from <tt>EventContext</tt> or <tt>EventDirContext</tt>.
  22. * Only the <tt>NamingListener</tt> argument of these methods are applicable;
  23. * the rest are ignored for a <tt>UnsolicitedNotificationListener</tt>.
  24. * (These arguments might be applicable to the listener if it implements
  25. * other listener interfaces).
  26. *</ol>
  27. *
  28. * @author Rosanna Lee
  29. * @author Scott Seligman
  30. * @author Vincent Ryan
  31. * @version 1.7 03/12/19
  32. *
  33. * @see UnsolicitedNotificationEvent
  34. * @see UnsolicitedNotification
  35. * @see javax.naming.event.EventContext#addNamingListener
  36. * @see javax.naming.event.EventDirContext#addNamingListener
  37. * @see javax.naming.event.EventContext#removeNamingListener
  38. * @since 1.3
  39. */
  40. public interface UnsolicitedNotificationListener extends NamingListener {
  41. /**
  42. * Called when an unsolicited notification has been received.
  43. *
  44. * @param evt The non-null UnsolicitedNotificationEvent
  45. */
  46. void notificationReceived(UnsolicitedNotificationEvent evt);
  47. }