Search in sources :

Example 11 with IMQService

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();
    }
}
Also used : MetricManager(com.sun.messaging.jmq.jmsserver.service.MetricManager) Agent(com.sun.messaging.jmq.jmsserver.management.agent.Agent) IMQService(com.sun.messaging.jmq.jmsserver.service.imq.IMQService)

Aggregations

IMQService (com.sun.messaging.jmq.jmsserver.service.imq.IMQService)11 Service (com.sun.messaging.jmq.jmsserver.service.Service)5 ServiceManager (com.sun.messaging.jmq.jmsserver.service.ServiceManager)5 FailedLoginException (com.sun.messaging.jmq.auth.api.FailedLoginException)2 AccessController (com.sun.messaging.jmq.jmsserver.auth.AccessController)2 AuthCacheData (com.sun.messaging.jmq.jmsserver.auth.AuthCacheData)2 HAMonitorService (com.sun.messaging.jmq.jmsserver.cluster.api.ha.HAMonitorService)2 Agent (com.sun.messaging.jmq.jmsserver.management.agent.Agent)2 MetricManager (com.sun.messaging.jmq.jmsserver.service.MetricManager)2 IMQConnection (com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection)2 IMQDirectService (com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService)2 BrokerException (com.sun.messaging.jmq.jmsserver.util.BrokerException)2 JMSService (com.sun.messaging.jmq.jmsservice.JMSService)2 ServiceInfo (com.sun.messaging.jmq.util.admin.ServiceInfo)2 CoreLifecycleSpi (com.sun.messaging.jmq.jmsserver.plugin.spi.CoreLifecycleSpi)1 Connection (com.sun.messaging.jmq.jmsserver.service.Connection)1 ConnectionManager (com.sun.messaging.jmq.jmsserver.service.ConnectionManager)1 ConnectionUID (com.sun.messaging.jmq.jmsserver.service.ConnectionUID)1 IMQBasicConnection (com.sun.messaging.jmq.jmsserver.service.imq.IMQBasicConnection)1 MetricCounters (com.sun.messaging.jmq.util.MetricCounters)1