String value = params[2];
String timestampStr = "";
String count = "1";
UnitType unitType = UnitType.N;
ValueType valueType = ValueType.VALUE;
if (params.length == 4) {
timestampStr = params[3];
} else {
unitType = getUnitType(params[3]);
valueType = getValueType(params[4]);
count = params[5];
timestampStr = params[6];
}
Long timeperiod = 0l;
try {
timeperiod = Long.parseLong(timestampStr);
timeperiod = ((long)(timeperiod / 15000));
} catch (NumberFormatException nfe) {
log.error("Unable to read in timestamp");
}
StringBuilder sb = new StringBuilder();
sb.append(agentName)
.append(":")
.append(path);
StoreIncomingStatisticsElement statElem = new StoreIncomingStatisticsElement();
statElem.setGuiPath(sb.toString());
statElem.setTimeperiod(timeperiod);
statElem.setValue(value);
statElem.setValueType(valueType.value());
statElem.setUnitType((unitType.value()));
statElem.setCount(count);
statList.add(statElem);
}
return statList;
}