org.jboss.jmx.adaptor.snmp.agent
Interface SnmpAgentRequestHandler

All Known Subinterfaces:
RequestHandler
All Known Implementing Classes:
RequestHandlerImpl, RequestHandlerSupport

public interface SnmpAgentRequestHandler

The SnmpAgentRequestHandler interface is implemented by an object that wishs to receive callbacks when an SNMP protocol data unit is received from a manager.


Method Summary
 org.snmp4j.PDU snmpReceivedGet(org.snmp4j.PDU pdu)
          This method is defined to handle SNMP Get requests that are received by the session.
 org.snmp4j.PDU snmpReceivedGetBulk(org.snmp4j.PDU pdu)
           This method handles SNMP Get Bulk requests received by the session Builds a response PDU and passes it back to the caller.
 void snmpReceivedPdu(org.snmp4j.Snmp session, java.net.InetAddress manager, int port, org.snmp4j.smi.OctetString community, org.snmp4j.PDU pdu)
          This method is defined to handle SNMP requests that are received by the session.
 org.snmp4j.PDU snmpReceivedSet(org.snmp4j.PDU pdu)
          This method is defined to handle SNMP Set requests that are received by the session.
 

Method Detail

snmpReceivedPdu

void snmpReceivedPdu(org.snmp4j.Snmp session,
                     java.net.InetAddress manager,
                     int port,
                     org.snmp4j.smi.OctetString community,
                     org.snmp4j.PDU pdu)

This method is defined to handle SNMP requests that are received by the session. The parameters allow the handler to determine the host, port, and community string of the received PDU

Parameters:
session - The SNMP session
manager - The remote sender
port - The remote senders port
community - The community string
pdu - The SNMP pdu

snmpReceivedGet

org.snmp4j.PDU snmpReceivedGet(org.snmp4j.PDU pdu)

This method is defined to handle SNMP Get requests that are received by the session. The request has already been validated by the system. This routine will build a response and pass it back to the caller.

Parameters:
pdu - The SNMP pdu
getNext - The agent is requesting the lexically NEXT item after each item in the pdu. *** THIS IS NO LONGER REQUIRED. REMOVED.***
Returns:
PDU filled in with the proper response, or null if cannot process. PDU's version is based on the @param pdu. NOTE: this might be changed to throw an exception.

snmpReceivedGetBulk

org.snmp4j.PDU snmpReceivedGetBulk(org.snmp4j.PDU pdu)

This method handles SNMP Get Bulk requests received by the session Builds a response PDU and passes it back to the caller.

Parameters:
pdu - The SNMP pdu
Returns:
PDU filled with the proper response. This PDU is either V2c or V3. this PDU will always try to ignore errors and fill with as much info as possible.

snmpReceivedSet

org.snmp4j.PDU snmpReceivedSet(org.snmp4j.PDU pdu)

This method is defined to handle SNMP Set requests that are received by the session. The request has already been validated by the system. This routine will build a response and pass it back to the caller.

Parameters:
pdu - The SNMP pdu
Returns:
PDU filled in with the proper response, or null if cannot process NOTE: this might be changed to throw an exception.


Copyright © 2011. All Rights Reserved.