com.adventnet.utils.agent
Class DynamicSnmpProxy

java.lang.Object
  extended by com.adventnet.snmp.snmp2.agent.Cache
      extended by com.adventnet.snmp.snmp2.agent.BaseSnmpStore
          extended by com.adventnet.snmp.snmp2.agent.SnmpStore
              extended by com.adventnet.snmp.snmp2.agent.SnmpProxy
                  extended by com.adventnet.utils.agent.DynamicSnmpProxy
All Implemented Interfaces:
VarBindRequestListener, AgentEventListener, java.io.Serializable

 class DynamicSnmpProxy
extends SnmpProxy


Field Summary
(package private) static int COMMUNITYBASED
           
(package private)  java.util.Hashtable entryTable
           
(package private)  java.util.Vector entryVector
           
(package private) static int INSTANCEBASED
           
(package private)  java.lang.String registeredOid
           
(package private)  boolean revertingToFirstInstance
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SnmpProxy
pdu
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
debugLevel, localAddress, protocol, session
 
Constructor Summary
DynamicSnmpProxy(int proxyBehavior)
           
 
Method Summary
(package private)  DynamicRegistrationEntry getMatchedEntry(int[] aoid, byte command)
           
 void getNextRequest(VarBindRequestEvent pe, AgentResource agentSource)
          method handles GetNextRequests from the manager Implementation of the VarBindRequestListener interface.
 void getRequest(VarBindRequestEvent pe)
          method handles GetRequests from the manager.
static int[] getUptoColumnOID(int[] oid, int pos)
           
(package private)  int handleGetNext(VarBindRequestEvent ve, DynamicRegistrationEntry entry)
           
(package private) static boolean isLessThan(int[] obj1, int[] obj2)
           
 void setRequest(VarBindRequestEvent pe)
          method handles setRequest from the manager Implementation of the VarBindRequestListener interface.
(package private)  void sort()
           
static void sort(java.util.Vector toSort)
           
(package private) static void swap(java.util.Vector x, int i, int j)
           
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SnmpProxy
addRegistrationListener, getAgentHost, getAgentPortNumber, getAgentTimeOut, getNextRequest, getRegisteredOid, getRespPdu, getRespPdu, getRetries, getRowStatus, getSubidList, getVersion, isProxySessionAlive, isProxyTimeOuts, isUserBasedCommunityPolicy, removeRegistrationListener, setAgentHost, setAgentPortNumber, setAgentTimeOut, setCommunity, setProxyTimeOuts, setRegisteredOid, setRetries, setRowStatus, setUserBasedCommunityPolicy, setVersion, startProxySession, stopProxySession
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SnmpStore
getProxySession, getTrapReceiverSession, initSnmpStore
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
closeAll, createProtocolOptions, finalize, getSnmpAPI, getSnmpSession, getSnmpSession, initSession, initSnmpStore, isAlive, isDebug, killSnmpAgent, setDebug
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache
getFromCache, getMibOperations, putInCache, setMibOperations
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMUNITYBASED

static final int COMMUNITYBASED
See Also:
Constant Field Values

INSTANCEBASED

static final int INSTANCEBASED
See Also:
Constant Field Values

entryTable

java.util.Hashtable entryTable

entryVector

java.util.Vector entryVector

registeredOid

java.lang.String registeredOid

revertingToFirstInstance

boolean revertingToFirstInstance
Constructor Detail

DynamicSnmpProxy

DynamicSnmpProxy(int proxyBehavior)
Method Detail

sort

void sort()

sort

public static void sort(java.util.Vector toSort)

swap

static void swap(java.util.Vector x,
                 int i,
                 int j)

isLessThan

static boolean isLessThan(int[] obj1,
                          int[] obj2)

getMatchedEntry

DynamicRegistrationEntry getMatchedEntry(int[] aoid,
                                         byte command)

getUptoColumnOID

public static int[] getUptoColumnOID(int[] oid,
                                     int pos)

handleGetNext

int handleGetNext(VarBindRequestEvent ve,
                  DynamicRegistrationEntry entry)
            throws AgentSnmpException
Throws:
AgentSnmpException

getRequest

public void getRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
method handles GetRequests from the manager. Implementation of the VarBindRequestListener interface.

Specified by:
getRequest in interface VarBindRequestListener
Overrides:
getRequest in class SnmpProxy
Parameters:
pe - the VarBindRequestEvent contains varbinds and information about the manager.
Throws:
AgentSnmpException - thrown if any error occurs.

getNextRequest

public void getNextRequest(VarBindRequestEvent pe,
                           AgentResource agentSource)
                    throws AgentSnmpException
method handles GetNextRequests from the manager Implementation of the VarBindRequestListener interface.

Specified by:
getNextRequest in interface VarBindRequestListener
Overrides:
getNextRequest in class SnmpProxy
Parameters:
pe - the VarBindRequestEvent contains varbinds and information about the manager.
agentSource - the AgentResource created for this request.
Throws:
AgentSnmpException - thrown if any error occurs.

setRequest

public void setRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
method handles setRequest from the manager Implementation of the VarBindRequestListener interface.

Specified by:
setRequest in interface VarBindRequestListener
Overrides:
setRequest in class SnmpProxy
Parameters:
pe - the VarBindRequestEvent contains varbinds and information about the manager.
Throws:
AgentSnmpException - thrown if any error occurs.