Lines Matching refs:listener

44  * <code>NotificationListener.handleNotification</code> method of each listener
49 * <p>If the method call of a filter or listener throws an {@link Exception},
64 * Constructs a NotificationBroadcasterSupport where each listener is invoked by the
74 * Constructs a NotificationBroadcasterSupport where each listener is invoked using
76 * sendNotification} is called, a listener is selected if it was added with a null
80 * that called <code>sendNotification</code>. Then, for each selected listener,
97 * about the notifications that may be sent. Each listener is
122 * and where each listener is invoked using the given {@link java.util.concurrent.Executor}.</p>
125 * listener is selected if it was added with a null {@link
132 * listener, {@link Executor#execute executor.execute} is called
161 * Adds a listener.
163 * @param listener The listener to receive notifications.
167 * listener when a notification is emitted. This object cannot be
169 * resent unchanged with the notification to the listener.
171 * @exception IllegalArgumentException thrown if the listener is null.
175 public void addNotificationListener(NotificationListener listener,
179 if (listener == null) {
183 listenerList.add(new ListenerInfo(listener, filter, handback));
186 public void removeNotificationListener(NotificationListener listener)
189 ListenerInfo wildcard = new WildcardListenerInfo(listener);
196 public void removeNotificationListener(NotificationListener listener,
201 ListenerInfo li = new ListenerInfo(listener, filter, handback);
223 * task per selected listener to deliver the notification to that listener.
255 * sendNotification} for each listener in order to send the
256 * notification to that listener. It can be overridden in
263 * listener.handleNotification(notif, handback);
266 * @param listener the listener to which the notification is being
268 * @param notif the notification being delivered to the listener.
270 * listener was added.
273 protected void handleNotification(NotificationListener listener,
275 listener.handleNotification(notif, handback);
280 NotificationListener listener;
284 ListenerInfo(NotificationListener listener,
287 this.listener = listener;
298 return (li.listener == listener);
300 return (li.listener == listener && li.filter == filter
306 return Objects.hashCode(listener);
311 WildcardListenerInfo(NotificationListener listener) {
312 super(listener, null, null);
352 handleNotification(listenerInfo.listener,