1 23 24 28 29 35 36 37 package com.sun.enterprise.admin.monitor.util; 38 import javax.management.j2ee.statistics.Stats ; 39 import javax.management.j2ee.statistics.Statistic ; 40 47 public class StatsToString { 48 private final Stats stats; 49 private final String NL = System.getProperty("line.separator"); 50 51 StatsToString(Stats stats) { 52 this.stats = stats; 53 } 54 public String toString() { 55 final StringBuffer s = new StringBuffer (stats.getClass().getName()).append(NL); 56 final Statistic [] ss = stats.getStatistics(); 57 for(int i = 0 ; i < ss.length ; i++) { 58 s.append(ss[i].toString()).append(NL); 59 } 60 return s.toString(); 61 } 62 } 63 | Popular Tags |