class Snmp.NotificationDispatcher extends java.lang.Object implements CommandResponder
NotificationDispatcher
dispatches traps, notifications,
and to registered listeners.Modifier and Type | Field and Description |
---|---|
private java.util.Hashtable<Address,TransportMapping> |
notificationListeners |
private java.util.Hashtable<TransportMapping,CommandResponder> |
notificationTransports |
Modifier | Constructor and Description |
---|---|
protected |
NotificationDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(Address listenAddress,
TransportMapping transport,
CommandResponder listener) |
void |
closeAll() |
void |
processPdu(CommandResponderEvent event)
Process an incoming request, report or notification PDU.
|
boolean |
removeNotificationListener(Address listenAddress) |
protected void |
sendInformResponse(CommandResponderEvent event)
Sends a RESPONSE PDU to the source address of a INFORM request.
|
private java.util.Hashtable<Address,TransportMapping> notificationListeners
private java.util.Hashtable<TransportMapping,CommandResponder> notificationTransports
public void addNotificationListener(Address listenAddress, TransportMapping transport, CommandResponder listener)
public boolean removeNotificationListener(Address listenAddress)
public void closeAll()
public void processPdu(CommandResponderEvent event)
CommandResponder
processPdu
in interface CommandResponder
event
- a CommandResponderEvent
instance containing the PDU to
process and some additional information returned by the message
processing model that decoded the SNMP message.protected void sendInformResponse(CommandResponderEvent event) throws MessageException
event
- the CommandResponderEvent
with the INFORM request.MessageException
- if the response could not be created and sent.