use of com.sun.jmx.snmp.SnmpOid in project jdk8u_jdk by JetBrains.
the class JvmMemPoolTableMetaImpl method getNextOid.
// See com.sun.jmx.snmp.agent.SnmpMibTable
protected SnmpOid getNextOid(SnmpOid oid, Object userData) throws SnmpStatusException {
final boolean dbg = log.isDebugOn();
try {
if (dbg)
log.debug("getNextOid", "previous=" + oid);
// Get the data handler.
//
SnmpTableHandler handler = getHandler(userData);
if (handler == null) {
//
if (dbg)
log.debug("getNextOid", "handler is null!");
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
// Get the next oid
//
final SnmpOid next = handler.getNext(oid);
if (dbg)
log.debug("getNextOid", "next=" + next);
//
if (next == null)
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
return next;
} catch (SnmpStatusException x) {
if (dbg)
log.debug("getNextOid", "End of MIB View: " + x);
throw x;
} catch (RuntimeException r) {
if (dbg)
log.debug("getNextOid", "Unexpected exception: " + r);
if (dbg)
log.debug("getNextOid", r);
throw r;
}
}
use of com.sun.jmx.snmp.SnmpOid in project jdk8u_jdk by JetBrains.
the class JvmMemGCTableMetaImpl method getNextOid.
// See com.sun.jmx.snmp.agent.SnmpMibTable
protected SnmpOid getNextOid(SnmpOid oid, Object userData) throws SnmpStatusException {
final boolean dbg = log.isDebugOn();
try {
if (dbg)
log.debug("getNextOid", "previous=" + oid);
// Get the data handler.
//
SnmpTableHandler handler = getHandler(userData);
if (handler == null) {
//
if (dbg)
log.debug("getNextOid", "handler is null!");
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
// Get the next oid, using the GC filter.
//
final SnmpOid next = filter.getNext(handler, oid);
if (dbg)
log.debug("getNextOid", "next=" + next);
//
if (next == null)
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
return next;
} catch (RuntimeException x) {
//
if (dbg)
log.debug("getNextOid", x);
throw x;
}
}
Aggregations