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 8 package javax.naming.ldap; 9 10 import javax.naming.event.NamingListener; 11 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.7 03/12/19 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 /** 46 * Called when an unsolicited notification has been received. 47 * 48 * @param evt The non-null UnsolicitedNotificationEvent 49 */ 50 void notificationReceived(UnsolicitedNotificationEvent evt); 51 } 52