SNMP Stack 5_1

uk.co.westhawk.snmp.event
Class RequestPduReceivedSupport

java.lang.Object
  |
  +--uk.co.westhawk.snmp.event.RequestPduReceivedSupport

public class RequestPduReceivedSupport
extends java.lang.Object

This is a utility class that can be used by classes that support request pdu listener functionality. You can use an instance of this class as a member field of your class and delegate various work to it.

Since:
4_14
Version:
$Revision: 1.4 $ $Date: 2006/01/17 17:59:33 $
Author:
Birgit Arkesteijn

Field Summary
static java.lang.String version_id
           
 
Constructor Summary
RequestPduReceivedSupport(java.lang.Object src)
          The constructor.
 
Method Summary
 void addRequestPduListener(RequestPduListener listener)
          Adds the specified pdu listener to receive pdus.
 void empty()
          Removes all the listeners.
 void fireRequestPduReceived(Pdu pdu, int hostPort)
          Fires a decoded pdu event.
 int getListenerCount()
          Returns the number of listeners.
 void removeRequestPduListener(RequestPduListener listener)
          Removes the specified pdu listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version_id

public static final java.lang.String version_id
See Also:
Constant Field Values
Constructor Detail

RequestPduReceivedSupport

public RequestPduReceivedSupport(java.lang.Object src)
The constructor.

Parameters:
src - The source (SnmpContext) of the pdu events when they are fired.
Method Detail

empty

public void empty()
Removes all the listeners.


getListenerCount

public int getListenerCount()
Returns the number of listeners.

Returns:
The number of listeners.

addRequestPduListener

public void addRequestPduListener(RequestPduListener listener)
Adds the specified pdu listener to receive pdus.


removeRequestPduListener

public void removeRequestPduListener(RequestPduListener listener)
Removes the specified pdu listener.


fireRequestPduReceived

public void fireRequestPduReceived(Pdu pdu,
                                   int hostPort)
Fires a decoded pdu event. The event is fired to all listeners, whether they consume it or not.

Parameters:
pdu - The decoded pdu pdu.

SNMP Stack 5_1