Methods Summary |
---|
public void | add(com.sun.jmx.snmp.SnmpOidTable table)Adds a SnmpOidTable object in this SnmpOidDatabase .
if (!tables.contains(table)) {
tables.addElement(table);
}
|
public java.util.Vector | getAllEntries()Returns a list that can be used to traverse all the entries of the SnmpOidTable objects
of this SnmpOidDatabase .
Vector res = new Vector();
for (int i=0;i<tables.size();i++) {
Vector tmp = ((SnmpOidTable)tables.elementAt(i)).getAllEntries();
if (tmp != null) {
for(int ii=0; ii<tmp.size(); ii++) {
res.addElement(tmp.elementAt(ii));
}
}
}
// res.addAll(((SnmpOidTable)tables.elementAt(i)).getAllEntries());
return res;
|
public void | remove(com.sun.jmx.snmp.SnmpOidTable table)Removes a SnmpOidTable object from this SnmpOidDatabase .
if (!tables.contains(table)) {
throw new SnmpStatusException("The specified SnmpOidTable does not exist in this SnmpOidDatabase");
}
tables.removeElement(table);
|
public void | removeAll()Removes all SnmpOidTable objects from this SnmpOidDatabase .
tables.removeAllElements() ;
|
public com.sun.jmx.snmp.SnmpOidRecord | resolveVarName(java.lang.String name)Searches for a MIB variable given its logical name and returns an SnmpOidRecord
object containing information on the variable.
for (int i=0;i<tables.size();i++) {
try {
return (((SnmpOidTable)tables.elementAt(i)).resolveVarName(name));
}
catch (SnmpStatusException e) {
if (i==tables.size()-1) {
throw new SnmpStatusException(e.getMessage());
}
}
}
return null;
|
public com.sun.jmx.snmp.SnmpOidRecord | resolveVarOid(java.lang.String oid)Searches for a MIB variable given its OID and returns an SnmpOidRecord object containing
information on the variable.
for (int i=0;i<tables.size();i++) {
try {
return (((SnmpOidTable)tables.elementAt(i)).resolveVarOid(oid));
}
catch (SnmpStatusException e) {
if (i==tables.size()-1) {
throw new SnmpStatusException(e.getMessage());
}
}
}
return null;
|