cdm/src/main/java/ucar/nc2/util/ListenerManager.java
public synchronized void sendEventExcludeSource(java.util.EventObject event) {
    if (!hasListeners || !enabled)
      return;

    Object source = event.getSource();
    Object[] args = new Object[1];
    args[0] = event;

    // send event to all listeners except the source
    ListIterator iter = listeners.listIterator();
    while (iter.hasNext()) {
      Object client = iter.next();
      if (client == source)
        continue;

      try {
        method.invoke(client, args);
      } catch (IllegalAccessException | InvocationTargetException | IllegalArgumentException e) {
        e.printStackTrace();
        if (e.getCause() != null)
          e.getCause().printStackTrace();

        // iter.remove();
        logger.error("ListenerManager calling " + method + " threw exception ", e);
      }
    }
  }
public synchronized void sendEventExcludeSource(java.util.EventObject event) {
    if (!hasListeners || !enabled)
      return;

    Object source = event.getSource();
    Object[] args = new Object[1];
    args[0] = event;

    // send event to all listeners except the source
    ListIterator iter = listeners.listIterator();
    while (iter.hasNext()) {
      Object client = iter.next();
      if (client == source)
        continue;

      try {
        method.invoke(client, args);
      } catch (IllegalAccessException | InvocationTargetException | IllegalArgumentException e) {
        e.printStackTrace();
        if (e.getCause() != null)
          e.getCause().printStackTrace();

        // iter.remove();
        logger.error("ListenerManager calling " + method + " threw exception ", e);
      }
    }
  }
public synchronized void sendEventExcludeSource ( java . util . EventObject event ) { if ( ! hasListeners || ! enabled ) return ; Object source = event . getSource ( ) ; Object [ ] args = new Object [ 1 ] ; args [ 0 ] = event ; // send event to all listeners except the source ListIterator iter = listeners . listIterator ( ) ; while ( iter . hasNext ( ) ) { Object client = iter . next ( ) ; if ( client == source ) continue ; try { method . invoke ( client , args ) ; } catch ( IllegalAccessException | InvocationTargetException | IllegalArgumentException e ) { e . printStackTrace ( ) ; if ( e . getCause ( ) != null ) e . getCause ( ) . printStackTrace ( ) ; // iter.remove(); logger . error ( "ListenerManager calling " + method + " threw exception " , e ) ; } } }
Send an event to all registered listeners, except the named one.

@param event the event to be sent: public void method_name( event_class event)
Send an event to all registered listeners except the named one .