List of usage examples for javax.management.j2ee.statistics Stats getStatisticNames
String[] getStatisticNames();
From source file:org.hyperic.hq.plugin.websphere.StatsDefaultCollector.java
public final void collect(AdminClient mServer) throws PluginException { Stats stats = getStats(mServer, getObjectName()); assert stats != null : getModuleName(); if (stats == null) { throw new PluginException("Stats not found"); }/*from w w w .j a v a 2 s.com*/ log.debug("[collect] '" + getModuleName() + "' stats: " + Arrays.asList(stats.getStatisticNames())); collectStatCount(stats, getAttributes()); setAvailability(true); }
From source file:org.hyperic.hq.plugin.websphere.WebsphereCollector.java
private boolean collectStats(AdminClient mServer, ObjectName oname) throws PluginException { Stats stats = getStats(mServer, oname); if (stats == null) { setAvailability(false);//from w w w.j a v a 2s .co m return false; } setAvailability(true); String[] names = stats.getStatisticNames(); Map values = getResult().getValues(); for (int i = 0; i < names.length; i++) { double val = getStatCount(stats, names[i]); //pmi names have lowercase 1st char String name = Character.toLowerCase(names[i].charAt(0)) + names[i].substring(1); values.put(name, new Double(val)); } return true; }