System.out.println("run() of SNMPTrapListener: Wait 10s.");
Thread.sleep(10000);
// Register with STAF
STAFHandle handle = new STAFHandle("SNMPTrapListener");
// Post event to notice that the trap listener is ready
System.out.println(
"run() of SNMPTrapListener: Send \"SNMPTrapListener/Ready\"" +
" event to " + remoteHost + ".");
handle.submit2(remoteHost, "SEM", "PULSE EVENT SNMPTrapListener/Ready");
// Wait event which notices that all the traps have been sent
System.out.println(
"run() of SNMPTrapListener: Wait \"SendTrap/Complete\" event " +
"from " + remoteHost + ".");
handle.submit2(remoteHost, "SEM", "WAIT EVENT SendTrap/Complete");
// Delte event
System.out.println(
"run() of SNMPTrapListener: Delte \"SendTrap/Complete\" event " +
"on " + remoteHost + ".");
handle.submit2(remoteHost, "SEM", "DELETE EVENT SendTrap/Complete");
// Display status of the traps
currentTrapNumber =
nbTrapV1_community +
nbTrapV1_otherCommunity +