public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
Set<MeasurementScheduleRequest> leftovers = new HashSet<MeasurementScheduleRequest>(metrics.size());
for (MeasurementScheduleRequest request : metrics) {
if (request.getName().equals("_aliases")) {
ReadAttribute op = new ReadAttribute(getAddress(), "alias");
Result res = getASConnection().execute(op);
if (res.isSuccess()) {
List<String> aliases = (List<String>) res.getResult();
MeasurementDataTrait data;
if (aliases != null) {
Collections.sort(aliases);
String trait = aliases.toString();
data = new MeasurementDataTrait(request, trait);
} else {
data = new MeasurementDataTrait(request, "-none-");
}
report.addData(data);
} else
getLog().warn("Could not get aliases for " + getAddress() + ": " + res.getFailureDescription());
} else {
leftovers.add(request);
}
}
super.getValues(report, leftovers);