Package org.rhq.core.system

Examples of org.rhq.core.system.NetworkStats


        }
    }

    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {

        NetworkStats stats = resourceContext.getSystemInformation().getNetworkStats("localhost", PORT);

        if (processInfo != null) {
            processInfo.refresh();

            for (MeasurementScheduleRequest request : metrics) {
                if (request.getName().startsWith("NetworkStat.")) {
                    int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
                    report.addData(new MeasurementDataNumeric(request, (double) val));
                } else if (request.getName().startsWith("Process.")) {
                    Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo, request.getName()
                        .substring("Process.".length()));
                    report.addData(new MeasurementDataNumeric(request, value));
View Full Code Here


    public void updateResourceConfiguration(ConfigurationUpdateReport report) {
    }

    @Override
    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
        NetworkStats stats = resourceContext.getSystemInformation().getNetworkStats("localhost", 22);
        processInfo.refresh();
        for (MeasurementScheduleRequest request : metrics) {
            if (request.getName().startsWith("NetworkStat.")) {
                int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
                report.addData(new MeasurementDataNumeric(request, (double) val));
            } else if (request.getName().startsWith("Process.")) {
                Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo,
                    request.getName().substring("Process.".length()));
                report.addData(new MeasurementDataNumeric(request, value));
View Full Code Here

TOP

Related Classes of org.rhq.core.system.NetworkStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.