equal
deleted
inserted
replaced
73 // package private; |
73 // package private; |
74 /** |
74 /** |
75 * Enqueue an event. |
75 * Enqueue an event. |
76 * @param event Either a <tt>NamingExceptionEvent</tt> or a subclass |
76 * @param event Either a <tt>NamingExceptionEvent</tt> or a subclass |
77 * of <tt>NamingEvent</tt> or |
77 * of <tt>NamingEvent</tt> or |
78 * <tt>UnsolicitedNotificatoniEvent</tt>. |
78 * <tt>UnsolicitedNotificationEvent</tt>. |
79 * If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement |
79 * If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement |
80 * the corresponding subinterface of <tt>NamingListener</tt>. |
80 * the corresponding subinterface of <tt>NamingListener</tt>. |
81 * For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em> |
81 * For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em> |
82 * implement the <tt>ObjectAddedListener</tt> interface. |
82 * implement the <tt>ObjectAddedListener</tt> interface. |
83 * <em>The current implementation does not check this before dispatching |
83 * <em>The current implementation does not check this before dispatching |
139 // Dispatch to corresponding NamingListener |
139 // Dispatch to corresponding NamingListener |
140 // The listener should only be getting the event that |
140 // The listener should only be getting the event that |
141 // it is interested in. (No need to check mask or |
141 // it is interested in. (No need to check mask or |
142 // instanceof subinterfaces.) |
142 // instanceof subinterfaces.) |
143 // It is the responsibility of the enqueuer to |
143 // It is the responsibility of the enqueuer to |
144 // only enqueue events with listseners of the correct type. |
144 // only enqueue events with listeners of the correct type. |
145 |
145 |
146 if (e instanceof NamingEvent) { |
146 if (e instanceof NamingEvent) { |
147 ((NamingEvent)e).dispatch(v.elementAt(i)); |
147 ((NamingEvent)e).dispatch(v.elementAt(i)); |
148 |
148 |
149 // An exception occurred: if notify all naming listeners |
149 // An exception occurred: if notify all naming listeners |