1 package uk.org.primrose.pool.jmx; 2 import java.util.ArrayList ; 3 4 public class AllPoolsOverview implements AllPoolsOverviewMBean { 5 ArrayList dataList = new ArrayList (); 6 7 public void addPoolData(Queue queue) { 8 dataList.add(queue); 9 } 10 11 public AllPoolsOverviewData[] getData() { 12 AllPoolsOverviewData[] data = new AllPoolsOverviewData[dataList.size()]; 13 for (int i = 0; i < dataList.size(); i++) { 14 Queue tmp = (Queue)dataList.get(i); 15 data[i] = new AllPoolsOverviewData(tmp.getName(), tmp.getAvailableConnectionsSize()+""); 16 } 17 18 return data; 19 } 20 } | Popular Tags |