com.adventnet.snmp.snmp2.vacm
Class VacmFamilyEntry

java.lang.Object
  extended by com.adventnet.snmp.snmp2.vacm.VacmFamilyEntry
All Implemented Interfaces:
java.io.Serializable

public class VacmFamilyEntry
extends java.lang.Object
implements java.io.Serializable

This class represents the VacmViewTreeFamilyEntry. It represents the vacmViewTreeFamilyEntry OBJECT-TYPE (OID - .1.3.6.1.6.3.16.1.5.2.1) from the ViewBasedAccessControl. This class has attributes like the familyName, familySubtree, familyMask, familyType. These attributes represent Information on a particular family of view subtrees included in or excluded from a particular SNMP context's MIB view. The VacmViewTreeEntry maintains a list of VacmFamilyEntry objects for each viewName.

See Also:
VacmViewTreeEntry, Serialized Form

Field Summary
static int EXCLUDED
          Constant value for VacmFamilyType EXCLUDED
(package private)  byte[] familyMask
          The familyMask which, in combination with the the familySubTree defines the family of view subtrees
(package private)  int familyStatus
          The status of the row in the table(particular entry)
(package private)  int[] familySubTree
          The vacmViewTreeFamilySubtree is the MIB subtree which when combined with the corresponding instance of vacmViewTreeFamilyMask defines a family of view subtrees.
(package private)  int familyType
          The familyType which specifies the family of view subtrees is include or excluded from the MIB Views
(package private)  byte[] familyViewName
          The human readable name for a family of view subtrees.
static int INCLUDED
          Constant value for VacmFamilyType INCLUDED
(package private) static int NONVOLATILE
           
(package private) static int OTHER
          The below are the various StorageType constants
(package private) static int PERMANENT
           
(package private) static int READONLY
           
(package private)  int storageType
          The StorageType variable
(package private)  boolean subTreeCheck
           
(package private) static int VOLATILE
           
 
Constructor Summary
VacmFamilyEntry(byte[] name, int[] subTree)
          Create a VacmFamilyEntry with the specified familyName and familySubTree.
 
Method Summary
(package private)  int compareLexicographically(int[] oid)
          Compares Lexicographically the familySubTree with the another subtree passes as parameter.
 boolean equals(VacmFamilyEntry entry)
          Compare two Objects for equality.
 byte[] getFamilyMask()
          Get the vacmViewTreeFamilyMask value.
 int getFamilyStatus()
          Get the vacmViewTreeFamilyStatus value.
 int getFamilyStorageType()
          Get the StorageType associated with this VacmFamilyEntry
 int[] getFamilySubTree()
          Get the vacmViewTreeFamilySubtree value.
 int getFamilyType()
          Get the vacmViewTreeFamilyType value.
 byte[] getFamilyViewName()
          Get the vacmViewTreeFamilyViewName value.
 void setFamilyMask(byte[] mask)
          Set the vacmViewTreeFamilyMask value.
 void setFamilyStatus(int status)
          Set the vacmViewTreeFamilyStatus value.
 void setFamilyStorageType(int storageType)
          Set the StorageType associated with this VacmFamilyEntry
 void setFamilyType(int type)
          Set the vacmViewTreeFamilyType value.
(package private)  boolean viewStatus(int[] OID)
          This method checks wheather this partricular VacmFamilyEntry is active and also if the requested OID matches the familySubTree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCLUDED

public static final int INCLUDED
Constant value for VacmFamilyType INCLUDED

See Also:
Constant Field Values

EXCLUDED

public static final int EXCLUDED
Constant value for VacmFamilyType EXCLUDED

See Also:
Constant Field Values

familyViewName

byte[] familyViewName
The human readable name for a family of view subtrees.


familySubTree

int[] familySubTree
The vacmViewTreeFamilySubtree is the MIB subtree which when combined with the corresponding instance of vacmViewTreeFamilyMask defines a family of view subtrees.


familyMask

byte[] familyMask
The familyMask which, in combination with the the familySubTree defines the family of view subtrees


familyType

int familyType
The familyType which specifies the family of view subtrees is include or excluded from the MIB Views


OTHER

static final int OTHER
The below are the various StorageType constants

See Also:
Constant Field Values

VOLATILE

static final int VOLATILE
See Also:
Constant Field Values

NONVOLATILE

static final int NONVOLATILE
See Also:
Constant Field Values

PERMANENT

static final int PERMANENT
See Also:
Constant Field Values

READONLY

static final int READONLY
See Also:
Constant Field Values

storageType

int storageType
The StorageType variable


familyStatus

int familyStatus
The status of the row in the table(particular entry)


subTreeCheck

boolean subTreeCheck
Constructor Detail

VacmFamilyEntry

public VacmFamilyEntry(byte[] name,
                       int[] subTree)
Create a VacmFamilyEntry with the specified familyName and familySubTree.

Parameters:
name - The familyViewName for this object
subTree - The familySubTree for this object.
Throws:
java.lang.NullPointerException - if the name or subTree is null.
Method Detail

getFamilyViewName

public byte[] getFamilyViewName()
Get the vacmViewTreeFamilyViewName value. The vacmViewTreeFamilyViewName is the human readable name for a family of view subtrees.

Returns:
vacmViewTreeFamilyViewName associated with this object.

getFamilySubTree

public int[] getFamilySubTree()
Get the vacmViewTreeFamilySubtree value. The vacmViewTreeFamilySubtree is the MIB subtree which when combined with the corresponding instance of vacmViewTreeFamilyMask defines a family of view subtrees.

Returns:
vacmViewTreeFamilySubtree associated with this object.

getFamilyMask

public byte[] getFamilyMask()
Get the vacmViewTreeFamilyMask value. The vacmViewTreeFamilyMask is the familyMask which, in combination with the the familySubTree defines the family of view subtrees.

Returns:
vacmViewTreeFamilyMask associated with this object.

setFamilyMask

public void setFamilyMask(byte[] mask)
Set the vacmViewTreeFamilyMask value. The vacmViewTreeFamilyMask is the familyMask which, in combination with the the familySubTree defines the family of view subtrees.

Parameters:
mask - The vacmViewTreeFamilyMask for this object. The size of this can be from zero to 16. If the input parameter is null then byte array of length zero is taken. If the length of the byte array is given greater than 16, then the value is not set and the previous value will be retained.

getFamilyType

public int getFamilyType()
Get the vacmViewTreeFamilyType value. The vacmViewTreeFamilyType specifies the family of view subtrees is include or excluded from the MIB Views. The possible values are INCLUDED or EXCLUDED, where, the value of INCLUDED is 1 and EXCLUDED is 2. These constants are defined in this class.

Returns:
vacmViewTreeFamilyType associated with this object.

setFamilyType

public void setFamilyType(int type)
Set the vacmViewTreeFamilyType value. The vacmViewTreeFamilyType specifies the family of view subtrees is include or excluded from the MIB Views. The possible values are INCLUDED or EXCLUDED, where, the value of INCLUDED is 1 and EXCLUDED is 2. These constants are defined in this class. If the parameter to be set is not valid, i.e neither INCLUDED nor EXCLUDED then the value is assumed to be EXCLUDED.

Parameters:
type - The vacmViewTreeFamilyType for this object.

getFamilyStorageType

public int getFamilyStorageType()
Get the StorageType associated with this VacmFamilyEntry


setFamilyStorageType

public void setFamilyStorageType(int storageType)
Set the StorageType associated with this VacmFamilyEntry


getFamilyStatus

public int getFamilyStatus()
Get the vacmViewTreeFamilyStatus value. The vacmViewTreeFamilyStatus is the rowStatus for this family entry. The SnmpAPI defines the rowStatus constants.

Returns:
familyStatus of this family entry.

setFamilyStatus

public void setFamilyStatus(int status)
Set the vacmViewTreeFamilyStatus value. The vacmViewTreeFamilyStatus is the rowStatus for this family entry. If the rowStatus value is not one of the valid values, then familyStatus is set to NOT_IN_SERVICE state. The SnmpAPI defines the rowStatus constants.

Parameters:
status - The vacmViewTreeFamilyStatus for this family entry.

equals

public boolean equals(VacmFamilyEntry entry)
Compare two Objects for equality. The result is true if the object to be compared is the same as this object.

Parameters:
entry - The object to compare this VacmFamilyEntry against.
Returns:
True if this object is the same as the VacmAccessEntry argument, false otherwise.

viewStatus

boolean viewStatus(int[] OID)
This method checks wheather this partricular VacmFamilyEntry is active and also if the requested OID matches the familySubTree. The API user need not use this method.

Parameters:
OID - The requested variable OID.
Returns:
True if above condition matches, false otherwise

compareLexicographically

int compareLexicographically(int[] oid)
Compares Lexicographically the familySubTree with the another subtree passes as parameter. The API user need not call this method. This is user by the addEntry method in VacmViewTreeTable.

Parameters:
oid - The familySubTree to be compared.
Returns:
-1 if this subTree is Lexicographically lesser than the subTree argument. 1 if this subtree is Lexicographically greater than the subtree argument.