1 6 package org.logicalcobwebs.proxool.admin; 7 8 import org.apache.commons.logging.Log; 9 import org.apache.commons.logging.LogFactory; 10 import org.logicalcobwebs.proxool.util.AbstractListenerContainer; 11 12 25 public class CompositeStatisticsListener extends AbstractListenerContainer implements StatisticsListenerIF { 26 static final Log LOG = LogFactory.getLog(CompositeStatisticsListener.class); 27 28 31 public void statistics(String alias, StatisticsIF statistics) 32 { 33 Object [] listeners = getListeners(); 34 35 for(int i=0; i<listeners.length; i++) { 36 try { 37 StatisticsListenerIF statisticsListener = (StatisticsListenerIF) listeners[i]; 38 statisticsListener.statistics(alias, statistics); 39 } 40 catch (RuntimeException re) { 41 LOG.warn("RuntimeException received from listener "+listeners[i]+" when dispatching statistics event", re); 42 } 43 } 44 } 45 } 46 47 | Popular Tags |