Пример #1
0
 /**
  * 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);
     }
   }
 }
Пример #2
0
 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());
     }
   }
 }