com.adventnet.snmp.snmp2.agent
Class SnmpStore

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.Cache
        |
        +--com.adventnet.snmp.snmp2.agent.BaseSnmpStore
              |
              +--com.adventnet.snmp.snmp2.agent.SnmpStore
Direct Known Subclasses:
SnmpProxy, SnmpTrapReceiverService

public abstract class SnmpStore
extends BaseSnmpStore

This class intialises api thread and session required for SnmpAgent,SnmpProxy and SnmpTrapService.

Cleans up the common session and associated API thread if no one is using it.

See Also:
Serialized Form

Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
debugLevel, localAddress, oldAddress, oldPort, protocol, session, snmpLog
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.Cache
cache, debug
 
Constructor Summary
protected SnmpStore()
          The no arg constructor which initialises the SnmpStore and the API thread.
protected SnmpStore(int port)
          The one arg(port) constructor which initialises the SnmpStore and the API thread.
protected SnmpStore(java.lang.String ipAddress)
          The one arg(ipAddress) constructor which initialises the SnmpStore and the API thread.
protected SnmpStore(java.lang.String ipAddress, int port)
          The two arg(ipAddress, port) constructor which initialises the SnmpStore and the API thread.
 
Method Summary
 SnmpSession getProxySession()
          Gets the SnmpSession, which is used for proxying the SnmpPDUs.
 SnmpSession getTrapReceiverSession()
          Gets the SnmpSession, which is used for Receiving the Snmp Trap PDUs.
protected  void initSnmpStore(SnmpStore store)
           
 
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
 

Constructor Detail

SnmpStore

protected SnmpStore()
The no arg constructor which initialises the SnmpStore and the API thread.

Doesn't open sessions This must be done explicitly by classes which extend SnmpStore


SnmpStore

protected SnmpStore(java.lang.String ipAddress)
The one arg(ipAddress) constructor which initialises the SnmpStore and the API thread.

Doesn't open sessions This must be done explicitly by classes which extend SnmpStore


SnmpStore

protected SnmpStore(int port)
The one arg(port) constructor which initialises the SnmpStore and the API thread.

Doesn't open sessions This must be done explicitly by classes which extend SnmpStore


SnmpStore

protected SnmpStore(java.lang.String ipAddress,
                    int port)
The two arg(ipAddress, port) constructor which initialises the SnmpStore and the API thread.

Doesn't open sessions This must be done explicitly by classes which extend SnmpStore

Method Detail

getProxySession

public SnmpSession getProxySession()
Gets the SnmpSession, which is used for proxying the SnmpPDUs. The sessions are stored in cache ,which is nothing but a static hastable in Cache class.
Returns:
a Session which can be used for Proxying

initSnmpStore

protected void initSnmpStore(SnmpStore store)

getTrapReceiverSession

public SnmpSession getTrapReceiverSession()
Gets the SnmpSession, which is used for Receiving the Snmp Trap PDUs. The sessions are stored in cache ,which is nothing but a static hastable in Cache class.
Returns:
a Session which can receive Traps in the MasterAgent.