com.adventnet.snmp.snmp2.agent
Class SnmpTargetParamsTableRequestHandler

java.lang.Object
  extended by com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
      extended by com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
          extended by com.adventnet.snmp.snmp2.agent.SnmpTargetParamsTableRequestHandler
All Implemented Interfaces:
VarBindRequestListener, AgentEventListener

public class SnmpTargetParamsTableRequestHandler
extends BaseTableRequestHandler

Handles all requests under snmpTargetParamsTable group


Field Summary
(package private)  SnmpAgent agentName
           
(package private)  SnmpAPI api
           
(package private) static int COLUMNCOUNT
           
(package private)  java.lang.String fileDir
           
(package private)  java.lang.String format
           
(package private)  java.util.Vector snmpTargetParamsEntryVector
           
(package private) static int SNMPTARGETPARAMSMPMODEL
           
(package private) static int SNMPTARGETPARAMSNAME
           
(package private) static int SNMPTARGETPARAMSROWSTATUS
           
(package private) static int SNMPTARGETPARAMSSECURITYLEVEL
           
(package private) static int SNMPTARGETPARAMSSECURITYMODEL
           
(package private) static int SNMPTARGETPARAMSSECURITYNAME
           
(package private) static int SNMPTARGETPARAMSSTORAGETYPE
           
(package private)  SnmpTargetParamsTable targetParamsTable
           
(package private)  SnmpTargetParamsTableXMLToVector xmlToVector
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
listenerList, tModelComplete
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener, writeEachTime
 
Constructor Summary
SnmpTargetParamsTableRequestHandler(SnmpAgent agentRef)
          Default Constructor with SnmpAgent Reference.
SnmpTargetParamsTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, java.lang.String format)
          Secondary constructor with Persistence support.
 
Method Summary
(package private)  boolean checkForRowStatus(SnmpTargetParamsEntry entry)
           
 boolean createAndAddSnmpTargetParamsEntry(java.lang.String targetParamsName, java.lang.Integer targetParamsMPModel, java.lang.Integer securityModel, java.lang.String securityName, java.lang.Integer securityLevel, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The method to create and Add a new Entry to the TargetParamsTable.
static SnmpTargetParamsEntry createSnmpTargetParamsEntry(java.lang.String targetParamsName, java.lang.Integer targetParamsMPModel, java.lang.Integer securityModel, java.lang.String securityName, java.lang.Integer securityLevel, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The Static method to create a new SnmpTargetAddrEntry.
 int[] getOidRep()
          Retrives the integer representation of OID
static int[] getSnmpTargetParamsTableOidRep()
          Gets the SnmpTargetParamsTable entry OID - int[] of {1,3,6,1,6,3,12,1,3,1}
protected  int[] getSubidList()
          Gets the subid list of the oid.
 java.util.Vector getTableVector()
          The method to get the Vector of SnmpTargetAddrEntries present in the SnmpTargetAddrTable.
protected  void processGetNextRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the GetNext Request message which is received from PduRequestHandler.
protected  void processGetRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the Get Request message which is received from PduRequestHandler.
protected  void processGetRequest(SnmpVarBind varb, int req, VarBindRequestEvent pe, SnmpTargetParamsEntry entry, byte[] paramsName)
           
protected  void processSetRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the Set Request message which is received from PduRequestHandler.
 void serialize(java.io.ObjectOutputStream outMain)
          For serializing this Tables Entries
 void setTableVector(java.util.Vector targetParamsVec)
          The method to set the Vector of SnmpTargetAddrEntries.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
addChangeListener, createChangeEvent, fireChangeEvent, removeChangeListener
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
addInstrumentHandler, addRegistrationListener, addTableListener, addUpdateListener, getInstrument, getMibVarHash, getNextRequest, getNextRequest, getObjectHash, getObjectTypeHash, getRequest, getTableListener, getUpdateListener, isWriteEachTime, processGetNextRequest, processGetRequest, processSetRequest, removeRegistrationListener, removeUpdateListener, setRequest, setWriteEachTime, writeIntoFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNMPTARGETPARAMSNAME

static final int SNMPTARGETPARAMSNAME
See Also:
Constant Field Values

SNMPTARGETPARAMSMPMODEL

static final int SNMPTARGETPARAMSMPMODEL
See Also:
Constant Field Values

SNMPTARGETPARAMSSECURITYMODEL

static final int SNMPTARGETPARAMSSECURITYMODEL
See Also:
Constant Field Values

SNMPTARGETPARAMSSECURITYNAME

static final int SNMPTARGETPARAMSSECURITYNAME
See Also:
Constant Field Values

SNMPTARGETPARAMSSECURITYLEVEL

static final int SNMPTARGETPARAMSSECURITYLEVEL
See Also:
Constant Field Values

SNMPTARGETPARAMSSTORAGETYPE

static final int SNMPTARGETPARAMSSTORAGETYPE
See Also:
Constant Field Values

SNMPTARGETPARAMSROWSTATUS

static final int SNMPTARGETPARAMSROWSTATUS
See Also:
Constant Field Values

COLUMNCOUNT

static final int COLUMNCOUNT
See Also:
Constant Field Values

agentName

SnmpAgent agentName

api

SnmpAPI api

targetParamsTable

SnmpTargetParamsTable targetParamsTable

snmpTargetParamsEntryVector

java.util.Vector snmpTargetParamsEntryVector

xmlToVector

SnmpTargetParamsTableXMLToVector xmlToVector

format

java.lang.String format

fileDir

java.lang.String fileDir
Constructor Detail

SnmpTargetParamsTableRequestHandler

public SnmpTargetParamsTableRequestHandler(SnmpAgent agentRef)
Default Constructor with SnmpAgent Reference.

Parameters:
agentRef - instance of SnmpAgent

SnmpTargetParamsTableRequestHandler

public SnmpTargetParamsTableRequestHandler(SnmpAgent agentRef,
                                           java.lang.String dirStr,
                                           java.lang.String fileName,
                                           java.lang.String format)
Secondary constructor with Persistence support.

Parameters:
agentRef - instance of the SnmpAgent.
dirStr - the directory location String of the File.
fileName - the fileName String.
format - the Format of Storage.("xml")
Method Detail

getSnmpTargetParamsTableOidRep

public static int[] getSnmpTargetParamsTableOidRep()
Gets the SnmpTargetParamsTable entry OID - int[] of {1,3,6,1,6,3,12,1,3,1}

Returns:
The registered Table Entry OID as an int array

getOidRep

public int[] getOidRep()
Description copied from class: SimpleRequestHandler
Retrives the integer representation of OID

Overrides:
getOidRep in class SimpleRequestHandler
Returns:
the integer array of OID

getSubidList

protected int[] getSubidList()
Description copied from class: SimpleRequestHandler
Gets the subid list of the oid.

Overrides:
getSubidList in class SimpleRequestHandler
Returns:
the integer array of subid list

processGetRequest

protected void processGetRequest(SnmpVarBind varb,
                                 AgentNode node,
                                 VarBindRequestEvent pe)
                          throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the Get Request message which is received from PduRequestHandler.

Overrides:
processGetRequest in class SimpleRequestHandler
Parameters:
varb - The received varbind .
node - The node for which Get Request is to be done.
pe - The VarBind Request Event created by this Get request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

processGetRequest

protected void processGetRequest(SnmpVarBind varb,
                                 int req,
                                 VarBindRequestEvent pe,
                                 SnmpTargetParamsEntry entry,
                                 byte[] paramsName)
                          throws AgentSnmpException
Throws:
AgentSnmpException

processSetRequest

protected void processSetRequest(SnmpVarBind varb,
                                 AgentNode node,
                                 VarBindRequestEvent pe)
                          throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the Set Request message which is received from PduRequestHandler.

Overrides:
processSetRequest in class SimpleRequestHandler
Parameters:
varb - The received varbind.
node - The node for which Get Next Request is to be done.
pe - The VarBind Request Event created by this GetNext request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

processGetNextRequest

protected void processGetNextRequest(SnmpVarBind varb,
                                     AgentNode node,
                                     VarBindRequestEvent pe)
                              throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the GetNext Request message which is received from PduRequestHandler.

Overrides:
processGetNextRequest in class SimpleRequestHandler
Parameters:
varb - The received varbind.
node - The node for which Get Next Request is to be done.
pe - The VarBind Request Event created by this GetNext request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

checkForRowStatus

boolean checkForRowStatus(SnmpTargetParamsEntry entry)
                    throws AgentException
Throws:
AgentException

createAndAddSnmpTargetParamsEntry

public boolean createAndAddSnmpTargetParamsEntry(java.lang.String targetParamsName,
                                                 java.lang.Integer targetParamsMPModel,
                                                 java.lang.Integer securityModel,
                                                 java.lang.String securityName,
                                                 java.lang.Integer securityLevel,
                                                 java.lang.Integer storageType,
                                                 java.lang.Integer rowStatus)
The method to create and Add a new Entry to the TargetParamsTable.

Parameters:
targetParamsName - The targetParamsName with which the entry is to be created.
targetParamsMPModel - The targetParamsMPModel with which the entry is to be created.
securityModel - The securityModel with which the entry is to be created.
securityName - The securityName with which the entry is to be created.
securityLevel - The securityLevel with which the entry is to be created.
storageType - The storageType for the Entry.
rowStatus - The RowStatus Integer for the Entry.
Returns:
boolean specifying whether the Entry is successfully added.
See Also:
createSnmpTargetParamsEntry.

createSnmpTargetParamsEntry

public static SnmpTargetParamsEntry createSnmpTargetParamsEntry(java.lang.String targetParamsName,
                                                                java.lang.Integer targetParamsMPModel,
                                                                java.lang.Integer securityModel,
                                                                java.lang.String securityName,
                                                                java.lang.Integer securityLevel,
                                                                java.lang.Integer storageType,
                                                                java.lang.Integer rowStatus)
The Static method to create a new SnmpTargetAddrEntry.

Parameters:
targetParamsName - The targetParamsName with which the entry is to be created.
targetParamsMPModel - The targetParamsMPModel with which the entry is to be created.
securityModel - The securityModel with which the entry is to be created.
securityName - The securityName with which the entry is to be created.
securityLevel - The securityLevel with which the entry is to be created.
storageType - The storageType for the Entry.
rowStatus - The RowStatus Integer for the Entry.
Returns:
SnmpTargetParamsEntry object created.
See Also:
createAndAddSnmpTargetAddrEntry.

setTableVector

public void setTableVector(java.util.Vector targetParamsVec)
The method to set the Vector of SnmpTargetAddrEntries.

Overrides:
setTableVector in class BaseTableRequestHandler
Parameters:
The - Vector of SnmpTargetAddrEntries.

getTableVector

public java.util.Vector getTableVector()
The method to get the Vector of SnmpTargetAddrEntries present in the SnmpTargetAddrTable.

Overrides:
getTableVector in class BaseTableRequestHandler
Returns:
The Vector of SnmpTargetAddrEntries.

serialize

public void serialize(java.io.ObjectOutputStream outMain)
For serializing this Tables Entries

Parameters:
outMain - the ObjectOutputStream for serializing.