de.mcs.jmeasurement.jmx.JmxPointsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JMeasurement Show documentation
Show all versions of JMeasurement Show documentation
JMeasurement profiling programs in production enviroment
/*
* MCS Media Computer Software Copyright (c) 2007 by MCS
* -------------------------------------- Created on 10.01.2007 by W.Klaas
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package de.mcs.jmeasurement.jmx;
import java.util.HashMap;
import java.util.Map;
import de.mcs.jmeasurement.MeasureFactory;
import de.mcs.jmeasurement.MeasurePoint;
/**
* This class is the implementation of the JMX points bean. Here we deliver all
* measure points as tabular data (Map)
*
* @author W.Klaas
*
*/
public class JmxPointsImpl implements JmxPointsMXBean {
/**
* Getting all measure points as map with key = name of the point (String)
* and the value is the proxy class JmxPoint for accessing the real
* MeasurePoint class.
*
* @return map
*/
public final Map getPoints() {
MeasurePoint[] points = MeasureFactory.getMeasurePoints(null);
HashMap hmData = new HashMap();
for (int i = 0; i < points.length; i++) {
hmData.put(points[i].getName(), new JmxPoint(points[i].getName()));
}
return hmData;
}
}