org.snmp4j.agent.agentx
Interface AgentXMessageDispatcher

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

public interface AgentXMessageDispatcher
extends org.snmp4j.transport.TransportListener


Method Summary
 void addCommandListener(AgentXCommandListener listener)
           
 void addTransportMapping(org.snmp4j.TransportMapping transport)
          Adds a TransportMapping to the dispatcher.
 java.util.Collection<org.snmp4j.TransportMapping> getTransportMappings()
          Gets the Collection of transport mappings in this message dispatcher.
 void removeCommandListener(AgentXCommandListener listener)
           
 org.snmp4j.TransportMapping removeTransportMapping(org.snmp4j.TransportMapping transport)
          Removes a previously added TransportMapping from the dispatcher.
 org.snmp4j.mp.PduHandle send(org.snmp4j.TransportMapping transport, org.snmp4j.smi.Address 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 Detail

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

java.util.Collection<org.snmp4j.TransportMapping> getTransportMappings()
Gets the Collection of transport mappings in this message dispatcher.

Returns:
Collection

addCommandListener

void addCommandListener(AgentXCommandListener listener)

removeCommandListener

void removeCommandListener(AgentXCommandListener listener)

send

org.snmp4j.mp.PduHandle send(org.snmp4j.TransportMapping transport,
                             org.snmp4j.smi.Address address,
                             AgentXPDU message,
                             org.snmp4j.mp.PduHandleCallback<AgentXPDU> pduHandleCallback)
                             throws java.io.IOException
Sends a AgentX PDU to the specified address using the specified transport mapping.

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:
java.io.IOException - if the IO operation fails.

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.