java.lang.Object
org.snmp4j.Snmp.NotificationDispatcher
- All Implemented Interfaces:
EventListener
,CommandResponder
- Enclosing class:
Snmp
The
NotificationDispatcher
dispatches traps, notifications, and to registered listeners.- Since:
- 1.6
- Version:
- 2.5.0
- Author:
- Frank Fock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotificationListener
(Address listenAddress, TransportMapping<?> transport, CommandResponder listener) void
closeAll()
getTransportMapping
(Address listenAddress) <A extends Address>
voidprocessPdu
(CommandResponderEvent<A> 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.
-
Constructor Details
-
NotificationDispatcher
protected NotificationDispatcher()
-
-
Method Details
-
getTransportMapping
-
addNotificationListener
public void addNotificationListener(Address listenAddress, TransportMapping<?> transport, CommandResponder listener) -
removeNotificationListener
-
closeAll
public void closeAll() -
processPdu
Description copied from interface:CommandResponder
Process an incoming request, report or notification PDU.- Specified by:
processPdu
in interfaceCommandResponder
- Type Parameters:
A
- type of the peerAddress
.- Parameters:
event
- aCommandResponderEvent
instance containing the PDU to process and some additional information returned by the message processing model that decoded the SNMP message.
-
sendInformResponse
Sends a RESPONSE PDU to the source address of a INFORM request.- Parameters:
event
- theCommandResponderEvent
with the INFORM request.- Throws:
MessageException
- if the response could not be created and sent.
-