< prev index next >

src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java

Print this page

        

*** 53,70 **** *<ul> *<li>The name argument of the registration. *<li>The filter (default is "(objectclass=*)"). *<li>The search controls (default is null SearchControls). *<li>The events that the listener is interested in. This is determined by ! * finding out which <tt>NamingListener</tt> interface the listener supports. *</ul> *<p> ! *A notifier (<tt>NamingEventNotifier</tt>) is a worker thread that is responsible *for gathering information for generating events requested by its listeners. *Each notifier maintains its own list of listeners; these listeners have *all made the same registration request (at different times) and implements ! *the same <tt>NamingListener</tt> interfaces. *<p> *For unsolicited listeners, this class maintains a vector, unsolicited. *When an unsolicited listener is registered, this class adds itself *to the context's LdapClient. When LdapClient receives an unsolicited *notification, it notifies this EventSupport to fire an event to the --- 53,70 ---- *<ul> *<li>The name argument of the registration. *<li>The filter (default is "(objectclass=*)"). *<li>The search controls (default is null SearchControls). *<li>The events that the listener is interested in. This is determined by ! * finding out which {@code NamingListener} interface the listener supports. *</ul> *<p> ! *A notifier ({@code NamingEventNotifier}) is a worker thread that is responsible *for gathering information for generating events requested by its listeners. *Each notifier maintains its own list of listeners; these listeners have *all made the same registration request (at different times) and implements ! *the same {@code NamingListener} interfaces. *<p> *For unsolicited listeners, this class maintains a vector, unsolicited. *When an unsolicited listener is registered, this class adds itself *to the context's LdapClient. When LdapClient receives an unsolicited *notification, it notifies this EventSupport to fire an event to the
*** 91,101 **** * *<h4>Event Dispatching</h4> *The notifiers are responsible for gather information for generating events *requested by their respective listeners. When a notifier gets sufficient *information to generate an event, it creates invokes the ! *appropriate <tt>fireXXXEvent</tt> on this class with the information and list of *listeners. This causes an event and the list of listeners to be added *to the <em>event queue</em>. *This class maintains an event queue and a dispatching thread that dequeues *events from the queue and dispatches them to the listeners. * --- 91,101 ---- * *<h4>Event Dispatching</h4> *The notifiers are responsible for gather information for generating events *requested by their respective listeners. When a notifier gets sufficient *information to generate an event, it creates invokes the ! *appropriate {@code fireXXXEvent} on this class with the information and list of *listeners. This causes an event and the list of listeners to be added *to the <em>event queue</em>. *This class maintains an event queue and a dispatching thread that dequeues *events from the queue and dispatches them to the listeners. *
*** 136,146 **** EventSupport(LdapCtx ctx) { this.ctx = ctx; } /** ! * Adds <tt>l</tt> to list of listeners interested in <tt>nm</tt>. */ /* * Make the add/removeNamingListeners synchronized to: * 1. protect usage of 'unsolicited', which may be read by * the Connection thread when dispatching unsolicited notification. --- 136,146 ---- EventSupport(LdapCtx ctx) { this.ctx = ctx; } /** ! * Adds {@code l} to list of listeners interested in {@code nm}. */ /* * Make the add/removeNamingListeners synchronized to: * 1. protect usage of 'unsolicited', which may be read by * the Connection thread when dispatching unsolicited notification.
*** 171,181 **** unsolicited.addElement((UnsolicitedNotificationListener)l); } } /** ! * Adds <tt>l</tt> to list of listeners interested in <tt>nm</tt> * and filter. */ synchronized void addNamingListener(String nm, String filter, SearchControls ctls, NamingListener l) throws NamingException { --- 171,181 ---- unsolicited.addElement((UnsolicitedNotificationListener)l); } } /** ! * Adds {@code l} to list of listeners interested in {@code nm} * and filter. */ synchronized void addNamingListener(String nm, String filter, SearchControls ctls, NamingListener l) throws NamingException {
*** 199,209 **** unsolicited.addElement((UnsolicitedNotificationListener)l); } } /** ! * Removes <tt>l</tt> from all notifiers in this context. */ synchronized void removeNamingListener(NamingListener l) { if (debug) System.err.println("EventSupport removing listener"); // Go through list of notifiers, remove 'l' from each. --- 199,209 ---- unsolicited.addElement((UnsolicitedNotificationListener)l); } } /** ! * Removes {@code l} from all notifiers in this context. */ synchronized void removeNamingListener(NamingListener l) { if (debug) System.err.println("EventSupport removing listener"); // Go through list of notifiers, remove 'l' from each.
< prev index next >