« Back
Hi,
Either of the methods releaseResources() and cleanup() does not remove a TrapListener from the SnmpTrapReceiver object.
To deregister a TrapListener, only the method removeTrapListener(TrapListener) has to be used.
I believe that, in your case, the this keyword in the method call
SnmpTrapReceiver.removeTrapListener(this)
might not reference that TrapListener object which was added to the SnmpTrapReceiver previously.
This might be the reason for the TrapListener not removed from the SnmpTrapReceiver object.
Thanks,
Amarnath
Either of the methods releaseResources() and cleanup() does not remove a TrapListener from the SnmpTrapReceiver object.
To deregister a TrapListener, only the method removeTrapListener(TrapListener) has to be used.
I believe that, in your case, the this keyword in the method call
SnmpTrapReceiver.removeTrapListener(this)
might not reference that TrapListener object which was added to the SnmpTrapReceiver previously.
This might be the reason for the TrapListener not removed from the SnmpTrapReceiver object.
Thanks,
Amarnath
Post Actions
Corp