[SNMP4J] Create, update, delete a row from a SNMP table using SNMP4J ...
George Lamprakis
glam at intracom.gr
Wed Sep 6 13:54:22 CEST 2006
Hi everyone,
I have just started using the SNMP4J and I would like to ask how can I create, delete, modify a row from a SNMP table using the SNMP4J library. I have found the method:
TableUtils.createRow(Target target,OID rowStatusColumnOID,OID rowIndex,VariableBinding[] values)
but how can I use this method to delete, for instance, an existing row. Moreover, what is the way of checking for errors? A sample code of error detection could be:
if((event=util.createRow(target,rowStatusColumnOID,rowIndex,values)) == null){
throw new Exception("IO exception occured.");
}else{
if(event.getResponse() == null){
throw new Exception("Request timed out.");
}else{
// what is the condition for error or success at this point ??????
???
}
}
Any help would be extremely appreciated.
Thanks in advance !!!
George
More information about the SNMP4J
mailing list