Interface AgentXMessageDispatcher

All Superinterfaces:
org.snmp4j.transport.TransportListener
All Known Implementing Classes:
AgentXMessageDispatcherImpl

public interface AgentXMessageDispatcher extends org.snmp4j.transport.TransportListener
The AgentXMessageDispatcher implements a TransportListener for dispatching AgentX messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a AgentXCommandListener to this message dispatcher.
    void
    addTransportMapping(org.snmp4j.TransportMapping<?> transport)
    Adds a TransportMapping to the dispatcher.
    Collection<org.snmp4j.TransportMapping<?>>
    Gets the Collection of transport mappings in this message dispatcher.
    void
    Removes a AgentXCommandListener from this message dispatcher.
    org.snmp4j.TransportMapping<?>
    removeTransportMapping(org.snmp4j.TransportMapping<?> transport)
    Removes a previously added TransportMapping from the dispatcher.
    <A extends org.snmp4j.smi.Address>
    org.snmp4j.mp.PduHandle
    send(org.snmp4j.TransportMapping<? super A> transport, A address, AgentXPDU message, org.snmp4j.mp.PduHandleCallback<AgentXPDU> pduHandleCallback)
    Sends a AgentX PDU to the specified address using the specified transport mapping.

    Methods inherited from interface org.snmp4j.transport.TransportListener

    processMessage
  • Method Details

    • addTransportMapping

      void addTransportMapping(org.snmp4j.TransportMapping<?> transport)
      Adds a TransportMapping to the dispatcher. The transport mapping is used to send and receive messages to/from the network.
      Parameters:
      transport - a TransportMapping instance.
    • removeTransportMapping

      org.snmp4j.TransportMapping<?> removeTransportMapping(org.snmp4j.TransportMapping<?> transport)
      Removes a previously added TransportMapping from the dispatcher.
      Parameters:
      transport - a TransportMapping instance.
      Returns:
      the TransportMapping instance supplied if it could be successfully removed, null otherwise.
    • getTransportMappings

      Collection<org.snmp4j.TransportMapping<?>> getTransportMappings()
      Gets the Collection of transport mappings in this message dispatcher.
      Returns:
      Collection
    • addCommandListener

      void addCommandListener(AgentXCommandListener listener)
      Adds a AgentXCommandListener to this message dispatcher.
      Parameters:
      listener - the command listener to add.
    • removeCommandListener

      void removeCommandListener(AgentXCommandListener listener)
      Removes a AgentXCommandListener from this message dispatcher.
      Parameters:
      listener - the listener to be removed.
    • send

      <A extends org.snmp4j.smi.Address> org.snmp4j.mp.PduHandle send(org.snmp4j.TransportMapping<? super A> transport, A address, AgentXPDU message, org.snmp4j.mp.PduHandleCallback<AgentXPDU> pduHandleCallback) throws IOException
      Sends a AgentX PDU to the specified address using the specified transport mapping.
      Type Parameters:
      A - target Address type.
      Parameters:
      transport - a TransportMapping supported by the AgentX protocol.
      address - the target Address.
      message - the AgentXPDU to send.
      pduHandleCallback - an optional callback reference. If not null then the callback will be informed about the assigned PduHandle just before the request is sent out.
      Returns:
      the PduHandle associated with the PDU.
      Throws:
      IOException - if the IO operation fails.