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