/** * Construct the PDU to perform the SNMP Get request and returns * the result in order to create the flow file. * @return {@link ResponseEvent} */ public ResponseEvent get() { try { PDU pdu = null; if(this.target.getVersion() == SnmpConstants.version3) { pdu = new ScopedPDU(); } else { pdu = new PDU(); } pdu.add(new VariableBinding(this.oid)); pdu.setType(PDU.GET); return this.snmp.get(pdu, this.target); } catch (IOException e) { logger.error("Failed to get information from SNMP agent; " + this, e); throw new ProcessException(e); } }
if(this.snmpTarget.getVersion() == SnmpConstants.version3) { pdu = new ScopedPDU(); } else {
/** * Construct the PDU to perform the SNMP Get request and returns * the result in order to create the flow file. * @return {@link ResponseEvent} */ public ResponseEvent get() { try { PDU pdu = null; if(this.target.getVersion() == SnmpConstants.version3) { pdu = new ScopedPDU(); } else { pdu = new PDU(); } pdu.add(new VariableBinding(this.oid)); pdu.setType(PDU.GET); return this.snmp.get(pdu, this.target); } catch (IOException e) { logger.error("Failed to get information from SNMP agent; " + this, e); throw new ProcessException(e); } }
if(this.snmpTarget.getVersion() == SnmpConstants.version3) { pdu = new ScopedPDU(); } else {