iCMS.trapd
Class MyTrapListener
java.lang.Object
luky.events.MyEventManager
iCMS.trapd.MyTrapListener
- All Implemented Interfaces:
- EventListener, TrapListener
public class MyTrapListener
- extends MyEventManager
- implements TrapListener
iCMS MyTrapListener is a listener to SNMP trap events and is
based on the Westhawk example
of a trap listener.
It can easiy be extended or replaced for the function required.
Revision Changes :
- ver 1.00 initial release
- ver 2.00 replace adventnet with westhawk lib
- ver 3.00 release for GPL with iCMS
- Version:
- 3.00
- Author:
- Chris Lukassen
-
Method Summary |
void |
destroy()
Clean up any context we may have |
void |
trapReceived(TrapEvent trap)
receivedTrap, This method is called when trap is received |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyTrapListener
public MyTrapListener(int port,
String community)
- constructor
- Parameters:
port
- Port to listen for traps, consider (SnmpContextBasisFace.DEFAULT_TRAP_PORT)community
- Consider "public"
destroy
public void destroy()
- Clean up any context we may have
trapReceived
public void trapReceived(TrapEvent trap)
- receivedTrap, This method is called when trap is received
- Specified by:
trapReceived
in interface TrapListener