Пример #1
0
 @Override
 protected void process(SNMPSequence trap) {
   try {
     if (trap instanceof SNMPv1TrapPDU) {
       sender.sendTrap(snmpAddr, community, (SNMPv1TrapPDU) trap);
     } else if (trap instanceof SNMPv2TrapPDU) {
       sender.sendTrap(snmpAddr, community, (SNMPv2TrapPDU) trap);
     }
     AgentDiagnostics.inc(countTraps, AgentDiagnostics.TRAPS_SENT);
   } catch (IOException e) {
     log.error(ZorkaLogger.ZAG_ERRORS, "Error sending SNMP trap", e);
   }
 }
Пример #2
0
 @Override
 public void close() {
   sender.close();
   sender = null;
 }