com.adventnet.snmp.mibs.agent
Class SnmpAgentDataHandler

java.lang.Object
  |
  +--com.adventnet.snmp.mibs.agent.SnmpAgentDataHandler

public class SnmpAgentDataHandler
extends java.lang.Object
implements VarBindRequestListener, java.io.Serializable

This class handles all the SnmpAgentData interfaces of the interpretted approach. Registers as a listener for each of the nodes etc with SnmpAgent

This class takes care of the script based Interpretted Approach of FILE-COMMAND , DATABASE-COMMAND etc.

See Also:
Serialized Form

Field Summary
(package private)  int agentVersion
           
(package private)  boolean createRow
           
(package private)  MibNode mibNode
           
(package private)  AgentMibOperations mibOps
           
(package private)  AgentMibNode node
           
 
Constructor Summary
SnmpAgentDataHandler(AgentMibNode node, AgentMibOperations mibOps)
          constructor initializing AgentMibNode and AgentMibOperations.
 
Method Summary
(package private)  void checkGetData(SnmpVarBind varb, MibNode temp, int version)
           
 void getNextRequest(VarBindRequestEvent pe, AgentResource agentSource)
          Implementations of VarBindRequestListener.Returns the value for the next OID.
(package private)  SnmpVar getNextRequestValue(SnmpVarBind varbind, AgentMibNode toSend, int version)
           
 void getRequest(VarBindRequestEvent pe)
          Implementations of VarBindRequestListener.Returns the value for the OID.
 int[] getSubidList()
          Part of interface .Returns the Child OIDs if node is a table.
(package private)  boolean isReplacable()
          This method lets us know if this listener is replacable ie is actually supporting a DEFVAL
 void setRequest(VarBindRequestEvent pe)
          Implementations of VarBindRequestListener.Sets the value to the given OID.
(package private)  SnmpVar setRequestValue(SnmpVarBind varbind, AgentMibNode temp, VarBindRequestEvent pe)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

AgentMibNode node

mibNode

MibNode mibNode

mibOps

AgentMibOperations mibOps

createRow

boolean createRow

agentVersion

int agentVersion
Constructor Detail

SnmpAgentDataHandler

public SnmpAgentDataHandler(AgentMibNode node,
                            AgentMibOperations mibOps)
constructor initializing AgentMibNode and AgentMibOperations.
Method Detail

getRequest

public void getRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
Implementations of VarBindRequestListener.Returns the value for the OID. throws AgentSnmpException when it fails.
Specified by:
getRequest in interface VarBindRequestListener
Parameters:
pe - having OID and related details for the get request.
See Also:
VarBindRequestEvent

getNextRequest

public void getNextRequest(VarBindRequestEvent pe,
                           AgentResource agentSource)
                    throws AgentSnmpException
Implementations of VarBindRequestListener.Returns the value for the next OID. throws AgentSnmpException when it fails.
Specified by:
getNextRequest in interface VarBindRequestListener
Parameters:
pe - having OID and related details for the get next request.
See Also:
VarBindRequestEvent

setRequest

public void setRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
Implementations of VarBindRequestListener.Sets the value to the given OID. throws AgentSnmpException when it fails.
Specified by:
setRequest in interface VarBindRequestListener
Parameters:
pe - having OID ,value and related details for the set request.
See Also:
VarBindRequestEvent

getSubidList

public int[] getSubidList()
Part of interface .Returns the Child OIDs if node is a table.

checkGetData

void checkGetData(SnmpVarBind varb,
                  MibNode temp,
                  int version)
            throws AgentSnmpException

getNextRequestValue

SnmpVar getNextRequestValue(SnmpVarBind varbind,
                            AgentMibNode toSend,
                            int version)
                      throws MibException,
                             AgentSnmpException

setRequestValue

SnmpVar setRequestValue(SnmpVarBind varbind,
                        AgentMibNode temp,
                        VarBindRequestEvent pe)
                  throws AgentSnmpException

isReplacable

boolean isReplacable()
This method lets us know if this listener is replacable ie is actually supporting a DEFVAL