Search in sources :

Example 1 with JMSStats

use of javax.management.j2ee.statistics.JMSStats in project newrelic-java-agent by newrelic.

the class J2EEStatsAttributeProcessor method process.

@Override
public boolean process(StatsEngine statsEngine, ObjectInstance instance, Attribute attribute, String metricName, Map<String, Float> values) {
    Object value = attribute.getValue();
    if (value instanceof Stats) {
        boolean isBuiltInMetric = isBuiltInMetric(metricName);
        if (value instanceof JDBCStats) {
            pullJDBCStats(statsEngine, (JDBCStats) value, attribute, metricName, values, isBuiltInMetric);
        } else if (value instanceof JCAStats) {
            pullJCAStats(statsEngine, (JCAStats) value, attribute, metricName, values, isBuiltInMetric);
        } else if (value instanceof JMSStats) {
            pullJMSStats(statsEngine, (JMSStats) value, attribute, metricName, values, isBuiltInMetric);
        } else {
            Stats jmxStats = (Stats) value;
            grabBaseStats(statsEngine, jmxStats, attribute, metricName, values, isBuiltInMetric);
        }
        return true;
    } else {
        Agent.LOG.finer(MessageFormat.format("Attribute value is not a javax.management.j2ee.statistics.Stats: {0}", value.getClass().getName()));
        return false;
    }
}
Also used : JMSConnectionStats(javax.management.j2ee.statistics.JMSConnectionStats) JCAConnectionPoolStats(javax.management.j2ee.statistics.JCAConnectionPoolStats) JMSSessionStats(javax.management.j2ee.statistics.JMSSessionStats) JCAStats(javax.management.j2ee.statistics.JCAStats) JMSStats(javax.management.j2ee.statistics.JMSStats) JCAConnectionStats(javax.management.j2ee.statistics.JCAConnectionStats) JDBCConnectionStats(javax.management.j2ee.statistics.JDBCConnectionStats) JDBCStats(javax.management.j2ee.statistics.JDBCStats) Stats(javax.management.j2ee.statistics.Stats) JDBCConnectionPoolStats(javax.management.j2ee.statistics.JDBCConnectionPoolStats) JDBCStats(javax.management.j2ee.statistics.JDBCStats) JCAStats(javax.management.j2ee.statistics.JCAStats) JMSStats(javax.management.j2ee.statistics.JMSStats)

Aggregations

JCAConnectionPoolStats (javax.management.j2ee.statistics.JCAConnectionPoolStats)1 JCAConnectionStats (javax.management.j2ee.statistics.JCAConnectionStats)1 JCAStats (javax.management.j2ee.statistics.JCAStats)1 JDBCConnectionPoolStats (javax.management.j2ee.statistics.JDBCConnectionPoolStats)1 JDBCConnectionStats (javax.management.j2ee.statistics.JDBCConnectionStats)1 JDBCStats (javax.management.j2ee.statistics.JDBCStats)1 JMSConnectionStats (javax.management.j2ee.statistics.JMSConnectionStats)1 JMSSessionStats (javax.management.j2ee.statistics.JMSSessionStats)1 JMSStats (javax.management.j2ee.statistics.JMSStats)1 Stats (javax.management.j2ee.statistics.Stats)1