/** * Method used to post new events and send them to the listeners * * @param e event object */ public void postEvent(Event e) { int etype = e.getType(); if (etype < 100) LOG.info("" + event_t.get(etype).toString()); else if (etype < 1000) LOG.info(" - " + event_t.get(etype).toString()); else LOG.info(" >> " + event_t.get(etype).toString()); List<EventPoolListener> auxl = _registeredListeners.get(e.getType()); if (auxl != null) { for (EventPoolListener l : auxl) { l.onEvent(e.getType(), e); } } }
/** Reset method */ public void reset() { // reset listeners for (EventPoolListener l : _listeners) l.reset(); }