return response;
}
protected TimeTicks getContextSysUpTime(OctetString context) {
MasterContextInfo info = (MasterContextInfo) contextInfo.get(context);
SysUpTime contextSysUpTime;
if (info == null) {
MOContextScope scope =
new DefaultMOContextScope(context,
SnmpConstants.sysUpTime, true,
SnmpConstants.sysUpTime, true);
ManagedObject mo = getManagedObject(context, new DefaultMOQuery(scope));
if (mo instanceof SysUpTime) {
contextSysUpTime = (SysUpTime) mo;
}
else {
/**@todo May be we can use an integer of the found object to
* initialize the time?
*/
LOGGER.warn("SysUpTime could not be found in '"+context+
"' context, using a new instance instead");
contextSysUpTime = new SysUpTimeImpl();
}
contextInfo.put(context,
new MasterContextInfo(context, contextSysUpTime));
}
else {
contextSysUpTime = info.getUpTime();
}
if (contextSysUpTime != null) {
return contextSysUpTime.get();
}
return null;
}