Module org.snmp4j
Package org.snmp4j

Class Snmp.NotificationDispatcher

  • All Implemented Interfaces:
    java.util.EventListener, CommandResponder
    Enclosing class:
    Snmp

    public class Snmp.NotificationDispatcher
    extends java.lang.Object
    implements CommandResponder
    The NotificationDispatcher dispatches traps, notifications, and to registered listeners.
    Since:
    1.6
    Version:
    2.5.0
    • Constructor Detail

      • NotificationDispatcher

        protected NotificationDispatcher()
    • Method Detail

      • removeNotificationListener

        public boolean removeNotificationListener​(Address listenAddress)
      • closeAll

        public void closeAll()
      • processPdu

        public <A extends Address> void processPdu​(CommandResponderEvent<A> event)
        Description copied from interface: CommandResponder
        Process an incoming request, report or notification PDU.
        Specified by:
        processPdu in interface CommandResponder
        Type Parameters:
        A - type of the peer Address.
        Parameters:
        event - a CommandResponderEvent instance containing the PDU to process and some additional information returned by the message processing model that decoded the SNMP message.
      • sendInformResponse

        protected void sendInformResponse​(CommandResponderEvent<?> event)
                                   throws MessageException
        Sends a RESPONSE PDU to the source address of a INFORM request.
        Parameters:
        event - the CommandResponderEvent with the INFORM request.
        Throws:
        MessageException - if the response could not be created and sent.