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

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

public class VacmViewTreeFamilyTableRequestHandler
extends SimpleRequestHandler

Handles all requests under vacmViewTreeFamilyTable 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)  java.util.Vector vacmFamilyEntryVector
           
(package private) static int VACMVIEWTREEFAMILYMASK
           
(package private) static int VACMVIEWTREEFAMILYSTATUS
           
(package private) static int VACMVIEWTREEFAMILYSTORAGETYPE
           
(package private) static int VACMVIEWTREEFAMILYSUBTREE
           
(package private) static int VACMVIEWTREEFAMILYTYPE
           
(package private) static int VACMVIEWTREEFAMILYVIEWNAME
           
(package private)  VacmViewTreeTable vacmViewTreeTable
           
(package private)  VacmViewTreeFamilyTableXMLToVector xmlToVector
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener
 
Constructor Summary
VacmViewTreeFamilyTableRequestHandler(SnmpAgent agentRef)
          Constructor for the VacmViewTreeFamilyTableRequestHandler with agent Reference.
VacmViewTreeFamilyTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, java.lang.String format)
          Constructor for the VacmViewTreeFamilyTableRequestHandler with agent Reference and the XML Persistence.
 
Method Summary
(package private)  boolean checkForRowStatus(VacmFamilyEntry entry)
           
 boolean createAndAddVacmFamilyEntry(java.lang.String familyViewName, java.lang.String familySubTree, java.lang.String familyMask, java.lang.Integer familyType, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The Method to Create and Add a new VacmFamilyEntry to VacmViewTreeFamilyTable.
static VacmFamilyEntry createVacmFamilyEntry(java.lang.String familyViewName, java.lang.String familySubTree, java.lang.String familyMask, java.lang.Integer familyType, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The Static Method to create a VacmFamilyEntry.
 java.util.Vector getFamilyTableVector()
          The method to return the Vector of VacmFamilyEntries present in the VacmViewTreeTable.
 int[] getOidRep()
          Retrives the integer representation of OID
protected  int[] getSubidList()
          Gets the subid list of the oid.
static int[] getVacmViewTreeFamilyTableOidRep()
          Getter for the Vacm View Tree Family Table Oid Representation.
 java.util.Vector getViewTreeTableVector()
          The method to return the Vector of VacmViewTreeTableEntries present in the VacmViewTreeTable.
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, VacmFamilyEntry 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 viewTreeVec)
          The method to set the Vector of VacmFamilyEntries.
 
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

VACMVIEWTREEFAMILYVIEWNAME

static final int VACMVIEWTREEFAMILYVIEWNAME
See Also:
Constant Field Values

VACMVIEWTREEFAMILYSUBTREE

static final int VACMVIEWTREEFAMILYSUBTREE
See Also:
Constant Field Values

VACMVIEWTREEFAMILYMASK

static final int VACMVIEWTREEFAMILYMASK
See Also:
Constant Field Values

VACMVIEWTREEFAMILYTYPE

static final int VACMVIEWTREEFAMILYTYPE
See Also:
Constant Field Values

VACMVIEWTREEFAMILYSTORAGETYPE

static final int VACMVIEWTREEFAMILYSTORAGETYPE
See Also:
Constant Field Values

VACMVIEWTREEFAMILYSTATUS

static final int VACMVIEWTREEFAMILYSTATUS
See Also:
Constant Field Values

agentName

protected SnmpAgent agentName
The Reference for the Snmp Agent Instance.


vacmViewTreeTable

VacmViewTreeTable vacmViewTreeTable

vacmFamilyEntryVector

java.util.Vector vacmFamilyEntryVector

format

java.lang.String format

fileDir

java.lang.String fileDir

xmlToVector

VacmViewTreeFamilyTableXMLToVector xmlToVector
Constructor Detail

VacmViewTreeFamilyTableRequestHandler

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

Parameters:
agentRef - The Reference for the SnmpAgent.

VacmViewTreeFamilyTableRequestHandler

public VacmViewTreeFamilyTableRequestHandler(SnmpAgent agentRef,
                                             java.lang.String dirStr,
                                             java.lang.String fileName,
                                             java.lang.String format)
Constructor for the VacmViewTreeFamilyTableRequestHandler with agent Reference and the XML Persistence.

Parameters:
agentRef - The Reference for the Snmp Agent.
dirStr - the directory location String of the File.
fileName - The fileName.
format - The FileFormat.
Method Detail

getVacmViewTreeFamilyTableOidRep

public static int[] getVacmViewTreeFamilyTableOidRep()
Getter for the Vacm View Tree Family Table Oid Representation.

Returns:
The VacmViewTreeFamily Table 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,
                                 VacmFamilyEntry 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 Family 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(VacmFamilyEntry entry)
                    throws AgentException
Throws:
AgentException

serialize

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

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

createAndAddVacmFamilyEntry

public boolean createAndAddVacmFamilyEntry(java.lang.String familyViewName,
                                           java.lang.String familySubTree,
                                           java.lang.String familyMask,
                                           java.lang.Integer familyType,
                                           java.lang.Integer storageType,
                                           java.lang.Integer rowStatus)
The Method to Create and Add a new VacmFamilyEntry to VacmViewTreeFamilyTable.

Parameters:
familyViewName - The familyViewName with which the entry is to be created.
familySubTree - The familySubTree value with which the entry is to be created.
familyMask - The familyMask with which the entry is to be created.
familyType - The familyType with which the entry is to be created(can be either Included(1) or Excluded(2).
storageType - The storageType for the Entry.
Returns:
the boolean specifying whether the row is added Successfylly or Not.
See Also:
createVacmAccessEntry.

createVacmFamilyEntry

public static VacmFamilyEntry createVacmFamilyEntry(java.lang.String familyViewName,
                                                    java.lang.String familySubTree,
                                                    java.lang.String familyMask,
                                                    java.lang.Integer familyType,
                                                    java.lang.Integer storageType,
                                                    java.lang.Integer rowStatus)
The Static Method to create a VacmFamilyEntry.

Parameters:
familyViewName - The familyViewName with which the entry is to be created.
familySubTree - The familySubTree value with which the entry is to be created.
familyMask - The familyMask with which the entry is to be created.
familyType - The familyType with which the entry is to be created(can be either Included(1) or Excluded(2).
storageType - The storageType for the Entry.
rowStatus - The RowStatus Integer for the Entry.
Returns:
The created VacmFamilyEntry Object.
See Also:
createAndAddVacmFamilyEntry.

getFamilyTableVector

public java.util.Vector getFamilyTableVector()
The method to return the Vector of VacmFamilyEntries present in the VacmViewTreeTable.

Returns:
The Vector of VacmFamilyEntries.

getViewTreeTableVector

public java.util.Vector getViewTreeTableVector()
The method to return the Vector of VacmViewTreeTableEntries present in the VacmViewTreeTable.

Returns:
The Vector of VacmViewTreeEntries.

setTableVector

public void setTableVector(java.util.Vector viewTreeVec)
The method to set the Vector of VacmFamilyEntries.

Parameters:
The - Vector of VacmFamilyEntries.