Package uk.co.westhawk.snmp.event
Class TrapReceivedSupport
java.lang.Object
uk.co.westhawk.snmp.event.TrapReceivedSupport
This is a utility class that can be used by classes that support trap
 listener functionality. 
 You can use an instance of this class as a member field
 of your class and delegate various work to it.
- Version:
 - $Revision: 1.6 $ $Date: 2006/01/17 17:43:53 $
 - Author:
 - Birgit Arkesteijn
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddTrapListener(TrapListener listener) Adds the specified trap listener to receive traps.voidempty()Removes all the listeners.voidfireTrapReceived(Pdu pdu, int hostPort) Fires a decoded trap event.intReturns the number of listeners.voidremoveTrapListener(TrapListener listener) Removes the specified trap listener. 
- 
Field Details
- 
version_id
- See Also:
 
 
 - 
 - 
Constructor Details
- 
TrapReceivedSupport
The constructor.- Parameters:
 src- The source (SnmpContext) of the trap events when they are fired.
 
 - 
 - 
Method Details
- 
empty
public void empty()Removes all the listeners. - 
getListenerCount
public int getListenerCount()Returns the number of listeners.- Returns:
 - The number of listeners.
 
 - 
addTrapListener
Adds the specified trap listener to receive traps. - 
removeTrapListener
Removes the specified trap listener. - 
fireTrapReceived
Fires a decoded trap event. The event is fired to all listeners, whether they consume it or not. This behaviour is different from the undecoded trap event.- Parameters:
 pdu- The decoded trap pdu.
 
 -