*/
@Override
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) {
boolean trace = log.isTraceEnabled();
if (trace) log.trace("Get values for these metrics: " + metrics);
EmsBean bean = getEmsBean();
bean.refreshAttributes();
if (trace) log.trace("Querying returned bean: " + bean);
for (MeasurementScheduleRequest req : metrics) {
DataType type = req.getDataType();
if (type == DataType.MEASUREMENT) {
EmsAttribute att = bean.getAttribute(req.getName());
if (att != null) {
MeasurementDataNumeric res = constructNumericMeasure(att.getTypeClass(), att.getValue(), req);
report.addData(res);
}
} else if (type == DataType.TRAIT) {
String value = (String) bean.getAttribute(req.getName()).getValue();
if (trace) log.trace("Metric ("+req.getName()+") is trait with value "+ value);
MeasurementDataTrait res = new MeasurementDataTrait(req, value);
report.addData(res);
}
}