com.adventnet.snmp.snmp2.agent.vacm
Class VacmSecurityToGroupTableRequestHandler

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

public class VacmSecurityToGroupTableRequestHandler
extends SimpleRequestHandler

Handles all requests under vacmSecurityToGroupTable group.


Field Summary
protected  SnmpAgent agentName
          The Reference for the Snmp Agent Instance.
(package private)  java.lang.String fileDir
           
(package private)  java.lang.String format
           
(package private) static int VACMGROUPNAME
           
(package private) static int VACMSECURITYMODEL
           
(package private) static int VACMSECURITYNAME
           
(package private)  java.util.Vector vacmSecurityToGroupEntryVector
           
(package private) static int VACMSECURITYTOGROUPSTATUS
           
(package private) static int VACMSECURITYTOGROUPSTORAGETYPE
           
(package private)  VacmGroupTable vacmSecurityToGroupTable
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener
 
Constructor Summary
VacmSecurityToGroupTableRequestHandler(SnmpAgent agentRef)
          Constructor for the VacmSecurityToGroupTableRequestHandler with agent Reference.
VacmSecurityToGroupTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, java.lang.String format)
          Constructor for the VacmSecurityToGroupTableRequestHandler with agent Reference.
 
Method Summary
(package private)  boolean checkForRowStatus(VacmGroupEntry entry)
           
 boolean createAndAddVacmGroupEntry(java.lang.Integer secModel, java.lang.String secName, java.lang.String grpName, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The static Method to Create and Add a new VacmGroupEntry to VacmGroupTable.
static VacmGroupEntry createVacmGroupEntry(java.lang.Integer secModel, java.lang.String secName, java.lang.String grpName, java.lang.Integer storageType, java.lang.Integer userStatus)
          The Static Method to create a VacmGroupEntry.
 int[] getOidRep()
          Retrives the integer representation of OID
protected  int[] getSubidList()
          Gets the subid list of the oid.
 java.util.Vector getTableVector()
          The method to return the Vector of Entries available in this Table.
static int[] getVacmSecurityToGroupTableOidRep()
          Getter for the Vacm Security to Group Table Oid Representation.
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, VacmGroupEntry entry)
          Process the Get Request message for the given params.
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)
          This method Serializes the Output Stream.
 void setTableVector(java.util.Vector vacmGrpVec)
          The method to set the Vector of Entries for this Table.
 
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

VACMSECURITYMODEL

static final int VACMSECURITYMODEL
See Also:
Constant Field Values

VACMSECURITYNAME

static final int VACMSECURITYNAME
See Also:
Constant Field Values

VACMGROUPNAME

static final int VACMGROUPNAME
See Also:
Constant Field Values

VACMSECURITYTOGROUPSTORAGETYPE

static final int VACMSECURITYTOGROUPSTORAGETYPE
See Also:
Constant Field Values

VACMSECURITYTOGROUPSTATUS

static final int VACMSECURITYTOGROUPSTATUS
See Also:
Constant Field Values

agentName

protected SnmpAgent agentName
The Reference for the Snmp Agent Instance.


vacmSecurityToGroupTable

VacmGroupTable vacmSecurityToGroupTable

vacmSecurityToGroupEntryVector

java.util.Vector vacmSecurityToGroupEntryVector

format

java.lang.String format

fileDir

java.lang.String fileDir
Constructor Detail

VacmSecurityToGroupTableRequestHandler

public VacmSecurityToGroupTableRequestHandler(SnmpAgent agentRef)
Constructor for the VacmSecurityToGroupTableRequestHandler with agent Reference.

Parameters:
agentRef - The Reference for the Snmp Agent.

VacmSecurityToGroupTableRequestHandler

public VacmSecurityToGroupTableRequestHandler(SnmpAgent agentRef,
                                              java.lang.String dirStr,
                                              java.lang.String fileName,
                                              java.lang.String format)
Constructor for the VacmSecurityToGroupTableRequestHandler with agent Reference.

Parameters:
agentRef - The Agent Reference.
dirStr - the directory location String of the File.
fileName - The fileName String.
format - The file format("xml").
Method Detail

getVacmSecurityToGroupTableOidRep

public static int[] getVacmSecurityToGroupTableOidRep()
Getter for the Vacm Security to Group Table Oid Representation.

Returns:
The Vacm Security To Group Oid Value.

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,
                                 VacmGroupEntry entry)
                          throws AgentSnmpException
Process the Get Request message for the given params.

Parameters:
varb - The received VarBind.
req - The request given.
pe - The Varbind Request Event created after thid Event.
entry - The Vacm Group Entry for the Request.
Throws:
This - wraps all the Exceptions thrown by the Agent while Processing this event.
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(VacmGroupEntry entry)
                    throws AgentException
Throws:
AgentException

getTableVector

public java.util.Vector getTableVector()
The method to return the Vector of Entries available in this Table.

Returns:
The Vector of VacmGroupEntries.

setTableVector

public void setTableVector(java.util.Vector vacmGrpVec)
The method to set the Vector of Entries for this Table.

Parameters:
vector - the Vector containing VamGroupEntries.

createAndAddVacmGroupEntry

public boolean createAndAddVacmGroupEntry(java.lang.Integer secModel,
                                          java.lang.String secName,
                                          java.lang.String grpName,
                                          java.lang.Integer storageType,
                                          java.lang.Integer rowStatus)
The static Method to Create and Add a new VacmGroupEntry to VacmGroupTable.

Parameters:
secModel - The securityModel with which the entry is to be created.
secName - the securityName for the Entry.
grpName - the groupName for the Entry.
storageType - the storageType for the Entry.
rowStatus - the rowStatus for the Entry.
Returns:
the boolean specifying whether the row is added Successfylly or Not.
See Also:
createVacmEntry.

createVacmGroupEntry

public static VacmGroupEntry createVacmGroupEntry(java.lang.Integer secModel,
                                                  java.lang.String secName,
                                                  java.lang.String grpName,
                                                  java.lang.Integer storageType,
                                                  java.lang.Integer userStatus)
The Static Method to create a VacmGroupEntry.

Parameters:
secModel - The securityModel with which the entry is to be created.
secName - the securityName for the Entry.
grpName - the groupName for the Entry.
storageType - the storageType int for the Entry.
userStatus - the RowStatus int for the Entry.
Returns:
The created VacmGroupEntry Object.
See Also:
createAndAddVacmGroupEntry.

serialize

public void serialize(java.io.ObjectOutputStream outMain)
This method Serializes the Output Stream.

Parameters:
outMain - The objet Output stream to be serialized.