use of com.sun.messaging.jmq.jmsserver.service.imq.IMQService in project openmq by eclipse-ee4j.
the class ResetMetricsHandler method resetAllMetrics.
/**
* Handle the incomming administration message.
*/
public static void resetAllMetrics() {
// reset destination
Globals.getDestinationList().resetAllMetrics(null);
// reset all services
List services = Globals.getServiceManager().getAllServiceNames();
Iterator itr = services.iterator();
while (itr.hasNext()) {
String name = (String) itr.next();
IMQService service = (IMQService) Globals.getServiceManager().getService(name);
if (service != null) {
service.resetCounters();
}
}
// reset metrics manager
MetricManager mm = Globals.getMetricManager();
mm.reset();
/*
* Reset metrics that are kept track of by JMX MBeans
*/
Agent agent = Globals.getAgent();
if (agent != null) {
agent.resetMetrics();
}
}
Aggregations