Methods Summary |
---|
public javax.management.j2ee.statistics.Statistic | getStatistic(java.lang.String statName)
return genericStatsDelegate.getStatistic(statName);
|
public java.lang.String[] | getStatisticNames()
return genericStatsDelegate.getStatisticNames();
|
public javax.management.j2ee.statistics.Statistic[] | getStatistics()
return genericStatsDelegate.getStatistics();
|
protected void | initialize(java.lang.String statInterfaceName)
try {
genericStatsDelegate = new GenericStatsImpl(statInterfaceName, this);
} catch(ClassNotFoundException cnfEx) {
throw new RuntimeException(statInterfaceName + " not found", cnfEx);
}
|
public java.lang.String | statToString()
StringBuffer sbuf = new StringBuffer();
Statistic[] stats = getStatistics();
int sz = stats.length;
for (int i=0; i<sz; i++) {
if (stats[i] instanceof CountStatistic) {
CountStatistic stat = (CountStatistic) stats[i];
sbuf.append(stat.getName()).append("=")
.append(stat.getCount()).append("; ");
} else if (stats[i] instanceof BoundedRangeStatistic) {
BoundedRangeStatistic stat = (BoundedRangeStatistic) stats[i];
sbuf.append(stat.getName()).append("=")
.append(stat.getCurrent()).append("; ");
} else {
sbuf.append(stats[i].getName()).append("=?");
}
}
return sbuf.toString();
|