public synchronized void sendEvent(java.util.EventObject event) {
    if (!hasListeners || !enabled)
      return;

    Object[] args = new Object[1];
    args[0] = event;

    // send event to all listeners
    ListIterator iter = listeners.listIterator();
    while (iter.hasNext()) {
      Object client = iter.next();
      try {
        method.invoke(client, args);
      } catch (IllegalAccessException e) {
        logger.error("ListenerManager IllegalAccessException", e);
        iter.remove();
      } catch (IllegalArgumentException e) {
        logger.error("ListenerManager IllegalArgumentException", e);
        iter.remove();
      } catch (InvocationTargetException e) {
        // logger.error("ListenerManager InvocationTargetException on " + method+ " threw exception " + e.getTargetException(), e);
        throw new RuntimeException(e.getCause()); // pass exception to the caller of sendEvent()
      }
    }
  }
public synchronized void sendEvent ( java . util . EventObject event ) { if ( ! hasListeners || ! enabled ) return ; Object [ ] args = new Object [ 1 ] ; args [ 0 ] = event ; ListIterator iter = listeners . listIterator ( ) ; while ( iter . hasNext ( ) ) { Object client = iter . next ( ) ; try { method . invoke ( client , args ) ; } catch ( IllegalAccessException e ) { logger . error ( "ListenerManager IllegalAccessException" , e ) ; iter . remove ( ) ; } catch ( IllegalArgumentException e ) { logger . error ( "ListenerManager IllegalArgumentException" , e ) ; iter . remove ( ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e . getCause ( ) ) ; } } }
Send an event to all registered listeners. If an exception is thrown, remove
the Listener from the list

@param event the event to be sent: public void method_name( event_class event)