Search in sources :

Example 16 with MetricCounters

use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.

the class ServiceMonitor method getNumActiveThreads.

public Integer getNumActiveThreads() {
    ServiceInfo si = ServiceUtil.getServiceInfo(service);
    MetricCounters metrics = si.metrics;
    if (metrics != null) {
        return (Integer.valueOf(metrics.threadsActive));
    } else {
        return (Integer.valueOf(-1));
    }
}
Also used : ServiceInfo(com.sun.messaging.jmq.util.admin.ServiceInfo) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 17 with MetricCounters

use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.

the class ServiceMonitor method getNumPktsOut.

public Long getNumPktsOut() {
    ServiceInfo si = ServiceUtil.getServiceInfo(service);
    MetricCounters metrics = si.metrics;
    if (metrics != null) {
        return (Long.valueOf(metrics.packetsOut));
    } else {
        return (Long.valueOf(-1));
    }
}
Also used : ServiceInfo(com.sun.messaging.jmq.util.admin.ServiceInfo) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 18 with MetricCounters

use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.

the class ServiceMonitor method getNumMsgsOut.

public Long getNumMsgsOut() {
    ServiceInfo si = ServiceUtil.getServiceInfo(service);
    MetricCounters metrics = si.metrics;
    if (metrics != null) {
        return (Long.valueOf(metrics.messagesOut));
    } else {
        return (Long.valueOf(-1));
    }
}
Also used : ServiceInfo(com.sun.messaging.jmq.util.admin.ServiceInfo) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Aggregations

MetricCounters (com.sun.messaging.jmq.util.MetricCounters)18 ServiceInfo (com.sun.messaging.jmq.util.admin.ServiceInfo)9 MetricManager (com.sun.messaging.jmq.jmsserver.service.MetricManager)4 BrokerAdmin (com.sun.messaging.jmq.admin.bkrutil.BrokerAdmin)1 BrokerAdminException (com.sun.messaging.jmq.admin.bkrutil.BrokerAdminException)1 Destination (com.sun.messaging.jmq.jmsserver.core.Destination)1 ServiceManager (com.sun.messaging.jmq.jmsserver.service.ServiceManager)1 IMQConnection (com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection)1 IMQService (com.sun.messaging.jmq.jmsserver.service.imq.IMQService)1 DestMetricsCounters (com.sun.messaging.jmq.util.DestMetricsCounters)1 MetricData (com.sun.messaging.jmq.util.MetricData)1 SizeString (com.sun.messaging.jmq.util.SizeString)1 Hashtable (java.util.Hashtable)1