Notify the management listeners on a filterWrite.
<p/>
NOTE: this starts on the IO thread, but runs a task OFF the thread.
14241
@Override
    public void doFilterWriteListeners(final long sessionId, final long sessionWrittenBytes, final WriteRequest writeRequest) {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    // The particular management listeners change on strategy, so get them here.
                    for (final GatewayManagementListener listener : getManagementListeners()) {
                        listener.doFilterWrite(GatewayManagementBeanImpl.this, sessionId);
                    }

                    markChanged();  // mark ourselves as changed, possibly tell listeners
                } catch (Exception ex) {
                    logger.warn("Error during filterWrite gateway listener notifications:", ex);
                }
            }
        });
    }
790025
function(isGlobal, server, msg, session, cb) {
  var fm;
  if(isGlobal) {
    fm = server.globalFilterService;
  } else {
    fm = server.filterService;
  }
  if(fm) {
    fm.beforeFilter(msg, session, cb);
  } else {
    utils.invokeCallback(cb);
  }
}
1054303
public void notifyTaskFailed(TaskExecutor executor, Throwable exception) {
		synchronized (listeners) {
			int size = listeners.size();
			if(size > 0){
				for (int i = 0; i < size; i++) {
					TaskListener listenerl = listeners.get(i);
					listenerl.onFailed(executor, exception);
				}
			}else{
				StaticLog.error(exception, exception.getMessage());
			}
		}
	}
1276771
private void notifyListeners(IMessagingClientFactory factory, boolean isAdded) {

		for (MessagingClientFactoryListener listener : this.listeners) {
			try {
				if (isAdded)
					listener.addMessagingClientFactory(factory);
				else
					listener.removeMessagingClientFactory(factory);

			} catch (Throwable t) {
				// Log the exception, but *do not* interrupt the notification of the other listeners.
				this.logger.warning("Messaging client factory listener has thrown an exception: " + listener);
				Utils.logException(this.logger, new RuntimeException(t));
			}
		}
	}
1155475
public void startMonitoring()
    throws IOException 
  {
    if (file == null) {
      writer = new PrintWriter(new BufferedOutputStream(System.out));
    } else {
      writer = new PrintWriter(new FileWriter(file, true));
    }
    super.startMonitoring();
  }
1295440
private void startHandleModifyThread(final WatchEvent<?> event, final Path currentPath) {
		ThreadUtil.execute(new Runnable(){
			@Override
			public void run() {
				ThreadUtil.sleep(delay);
				eventSet.remove(Paths.get(currentPath.toString(), event.context().toString()));
				watcher.onModify(event, currentPath);
			}
		});
	}
899877
@Override
  public void notifyForeignWatch(byte[] key, String serverId)
  {
    ClusterServiceKraken proxy = _podKraken.getProxy(serverId);
    
    if (proxy != null) {
      proxy.notifyLocalWatch(_table.getKey(), key);
    }
  }
381617
public void fireTaskWrittenEvent(Task task)
   {
      if (m_projectListeners != null)
      {
         for (ProjectListener listener : m_projectListeners)
         {
            listener.taskWritten(task);
         }
      }
   }
626097
protected void monitorDir(String directory,IOFileFilter filter) throws Exception
	{
		FileAlterationObserver observer=new FileAlterationObserver(directory,filter);
		observer.initialize();
		observer.addListener(fileListener);
		observers.add(observer);
	}
396760
@Override public void onPermissionsChecked(final MultiplePermissionsReport report) {
    thread.execute(new Runnable() {
      @Override public void run() {
        listener.onPermissionsChecked(report);
      }
    });
  }
942370
void notifyAndClearListeners() {
    if (!canBeCancelled()) {
      return;
    }
    ArrayList<ExecutableListener> tmpListeners;
    synchronized (this) {
      if (listeners == null) {
        return;
      }
      tmpListeners = listeners;
      listeners = null;
    }
    // Deliver events to non-child context listeners before we notify child contexts. We do this
    // to cancel higher level units of work before child units. This allows for a better error
    // handling paradigm where the higher level unit of work knows it is cancelled and so can
    // ignore errors that bubble up as a result of cancellation of lower level units.
    for (int i = 0; i < tmpListeners.size(); i++) {
      if (!(tmpListeners.get(i).listener instanceof ParentListener)) {
        tmpListeners.get(i).deliver();
      }
    }
    for (int i = 0; i < tmpListeners.size(); i++) {
      if (tmpListeners.get(i).listener instanceof ParentListener) {
        tmpListeners.get(i).deliver();
      }
    }
    if (cancellableAncestor != null) {
      cancellableAncestor.removeListener(parentListener);
    }
  }
1337077
protected void notifyListeners() {
		Iterator it = listeners.iterator();
		while (it.hasNext()) {
			((ComponentListener) it.next()).componentActivated(this);
		}
	}
948974
@Override
    public void doSessionCreatedListeners(final long sessionId, final ManagementSessionType managementSessionType) {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    // The particular management listeners change on strategy, so get them here.
                    for (final GatewayManagementListener listener : getManagementListeners()) {
                        listener.doSessionCreated(GatewayManagementBeanImpl.this, sessionId);
                    }

                    markChanged();  // mark ourselves as changed, possibly tell listeners
                } catch (Exception ex) {
                    logger.warn("Error during sessionCreated gateway listener notifications:", ex);
                }
            }
        });
    }
59225
def notify_listeners(self, msg_type, params):
        """"""
        for c in self.listeners:
            c.notify(msg_type, params)
1294537
protected void notifyObservers (final Name username, final boolean muted)
    {
        _observers.apply(new ObserverList.ObserverOp<MuteObserver>() {
            public boolean apply (MuteObserver observer) {
                observer.muteChanged(username, muted);
                return true;
            }
        });
    }
625311
private void postRoutedServerNotificationListenerRegistrationEvent(String operation, NotificationTargetInformation nti, ObjectName listener,
                                                                       NotificationFilter filter, Object handback) {
        Map<String, Object> props = createServerListenerRegistrationEvent(operation, nti, listener, filter, handback);
        safePostEvent(new Event(REGISTER_JMX_NOTIFICATION_LISTENER_TOPIC, props));
    }
828999
@Override
    public void filterWrite(NextFilter nextFilter, IoSession session,
            WriteRequest writeRequest) throws Exception {

        Object data = writeRequest.getMessage();

        if (data instanceof IoBuffer) {
            write(session, (IoBuffer) data);
        } else {
            throw new IllegalArgumentException(
                    "This filter should only buffer IoBuffer objects");
        }
    }