/** * Executes the SNMP set request and returns the response * @param pdu PDU to send * @return Response event * @throws IOException IO Exception */ public ResponseEvent set(PDU pdu) throws IOException { return this.snmp.set(pdu, this.target); }
/** * Executes the SNMP set request and returns the response * @param pdu PDU to send * @return Response event * @throws IOException IO Exception */ public ResponseEvent set(PDU pdu) throws IOException { return this.snmp.set(pdu, this.target); }
public ResponseEvent set(PDU pdu, Target target) { try { return snmp.set(pdu, target); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }
/** * Sends a SET-type PDU to the target specified by the constructor. * * @param pdu * The message content to be sent to the target * @return ResponseEvent * @throws IOException */ public ResponseEvent set(PDU pdu, Snmp snmpob, UserTarget targetob, Boolean keepOpen) throws IOException { // Ensure the object has been instantiated if (!ready) { throw new IOException("Tried to send PDU before SNMP sending service is ready."); } if (!listening) { startListen(); } // Try to send the SNMP request (synchronously) ResponseEvent responseEvent = null; try { responseEvent = snmpob.set(pdu, targetob); if (!keepOpen) { snmpob.close(); } } catch (IOException e) { throw new IOException("Failed to send SNMP request: " + e); } return responseEvent; }
System.out.println("SENDING: "+t1); System.out.println("PDU: " + pdu); ResponseEvent responseEvent = snmp.set(pdu, target); long t2=System.currentTimeMillis(); System.out.println("SENT: "+t2);
System.out.println("SENDING: "+t1); System.out.println("PDU: " + pdu); ResponseEvent responseEvent = snmp.set(pdu, target); long t2=System.currentTimeMillis(); System.out.println("SENT: "+t2);
System.out.println("READY: "+System.currentTimeMillis()); Snmp snmp = new Snmp(transport); ResponseEvent responseEvent = snmp.set(pdu, target); System.out.println("response " + responseEvent.toString());
System.out.println("READY: "+System.currentTimeMillis()); Snmp snmp = new Snmp(transport); ResponseEvent responseEvent = snmp.set(pdu, target); System.out.println("response " + responseEvent.toString());
ResponseEvent responseEvent = snmp.set(request, target);
ResponseEvent response = snmp.set(pdu, comtarget);
ResponseEvent response = snmp.set(pdu, comtarget);
ResponseEvent responseEvent = snmp.set(request, target);