/** * Fire the event - in all registered handlers. * * @param event */ public void fireEvent(TorEvent event) { for (TorEventHandler eventHandler : eventHandlers) { try { eventHandler.fireEvent(event); } catch (Exception e) { log.log(Level.WARNING, "TorEventService.fireEvent()", e); } } }
void fireEvent(TorEvent event) { for (int i = 0; i < eventHandler.size(); ++i) { try { TorEventHandler eh = (TorEventHandler) eventHandler.elementAt(i); eh.ping(event); } catch (Exception e) { Logger.logGeneral(Logger.INFO, "Tor.fireEvent(): " + e.getMessage()); } } }