iCMS.trapd
Class MyTrapListener

java.lang.Object
  extended by luky.events.MyEventManager
      extended by 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 :

Version:
3.00
Author:
Chris Lukassen
 

Field Summary
 
Fields inherited from class luky.events.MyEventManager
listenerList
 
Fields inherited from interface uk.co.westhawk.snmp.event.TrapListener
version_id
 
Constructor Summary
MyTrapListener(int port, String community)
          constructor
 
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 luky.events.MyEventManager
addMyEventListener, fireMyEvent, removeMyEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyTrapListener

public MyTrapListener(int port,
                      String community)
constructor

Parameters:
port - Port to listen for traps, consider (SnmpContextBasisFace.DEFAULT_TRAP_PORT)
community - Consider "public"
Method Detail

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