Methods Summary |
---|
void | debug(java.lang.String clz, java.lang.String func, java.lang.String info)
Trace.send(Trace.LEVEL_DEBUG, Trace.INFO_SNMP, clz, func, info);
|
void | debug(java.lang.String func, java.lang.String info)
debug(dbgTag, func, info);
|
public boolean | equals(java.lang.Object object)Checks if the specified Object is equal to this SnmpOidTableSupport .
if (!(object instanceof SnmpOidTableSupport)) {
return false;
}
SnmpOidTableSupport val = (SnmpOidTableSupport) object;
return myName.equals(val.getName());
|
public java.util.Vector | getAllEntries()Returns a list that can be used to traverse all the entries in this SnmpOidTable .
Vector elementsVector = new Vector();
// get the locally defined elements ...
for (Enumeration e = oidStore.elements();
e.hasMoreElements(); ) {
elementsVector.addElement(e.nextElement());
}
return elementsVector ;
|
public java.lang.String | getName()Returns the name identifying this SnmpOidTableSupport object.
return myName;
|
boolean | isDebugOn()
return Trace.isSelected(Trace.LEVEL_DEBUG, Trace.INFO_SNMP);
|
boolean | isTraceOn()
return Trace.isSelected(Trace.LEVEL_TRACE, Trace.INFO_SNMP);
|
public synchronized void | loadMib(com.sun.jmx.snmp.SnmpOidRecord[] mibs)Loads a list of variables into the storage area,
which is kept in memory. If you have new MIB variables,
this method can be called to load them.
try {
for (int i = 0; ; i++) {
SnmpOidRecord s = mibs[i] ;
if (isTraceOn()) {
trace("loadMib", "load " + s.getName());
}
oidStore.put(s.getName(), s) ;
}
} catch (ArrayIndexOutOfBoundsException e) {
}
|
public com.sun.jmx.snmp.SnmpOidRecord | resolveVarName(java.lang.String name)Searches for a MIB variable given its logical name and returns an {@link com.sun.jmx.snmp.SnmpOidRecord} object
containing information on the variable.
SnmpOidRecord var = (SnmpOidRecord)oidStore.get(name) ;
if (var != null) {
return var;
} else {
throw new SnmpStatusException("Variable name <" + name + "> not found in Oid repository") ;
}
|
public com.sun.jmx.snmp.SnmpOidRecord | resolveVarOid(java.lang.String oid)Searches for a MIB variable given its OID and returns an {@link com.sun.jmx.snmp.SnmpOidRecord} object
containing information on the variable.
// Try to see if the variable name is actually an OID to resolve.
//
int index = oid.indexOf('.") ;
if (index < 0) {
throw new SnmpStatusException("Variable oid <" + oid + "> not found in Oid repository") ;
}
if (index == 0) {
// The oid starts with a '.' ala CMU.
//
oid= oid.substring(1, oid.length());
}
// Go through the oidStore ... Good luck !
//
for(Enumeration list= oidStore.elements(); list.hasMoreElements(); ) {
SnmpOidRecord element= (SnmpOidRecord) list.nextElement();
if (element.getOid().equals(oid))
return element;
}
throw new SnmpStatusException("Variable oid <" + oid + "> not found in Oid repository") ;
|
void | trace(java.lang.String func, java.lang.String info)
trace(dbgTag, func, info);
|
void | trace(java.lang.String clz, java.lang.String func, java.lang.String info)
Trace.send(Trace.LEVEL_TRACE, Trace.INFO_SNMP, clz, func, info);
|