target.setVersion(SnmpConstants.version1); //Set the correct SNMP version here
PDU pdu = new PDU();
//Depending on the MIB attribute type, appropriate casting can be done here
pdu.add(new VariableBinding(new OID(strOID), new Integer32(Integer.valueOf(value))));
pdu.setType(PDU.SET);
ResponseListener listener = new ResponseListener() {
public void onResponse(ResponseEvent event) {
PDU strResponse;
String result;
((Snmp) event.getSource()).cancel(event.getRequest(), this);