com.adventnet.snmp.snmp2.vacm
Class VacmGroupAccessTable
java.lang.Object
|
+--com.adventnet.snmp.snmp2.vacm.VacmGroupAccessTable
- public class VacmGroupAccessTable
- extends java.lang.Object
This class maintains a list of VacmGroupAccessEntry objects. It provides
methods to get, add and remove groupAccessEntry objects. Once a
VacmAccessEntry is created, it has to added using the addEntry method
provided in this class. There is no need to instantiate this class as
it is instantiated in the SnmpAPI constructor. The SnmpAPI provides
methods to access this VacmGroupAccessTable.
- See Also:
SnmpAPI
|
Method Summary |
boolean |
addEntry(VacmAccessEntry accessEntry,
byte[] groupName)
Adds the VacmAccessEntry object to the list of VacmAccessEntry
objects in the VacmGroupAccessEntry. |
void |
deSerialize(java.io.ObjectInputStream in)
Retrives the VacmGroupAccess entries from the file VacmGroupAccessEntry to the GrpAccessTable |
VacmGroupAccessEntry |
getEntry(byte[] groupName)
Returns the VacmGroupAccessEntry object corresponding to the
groupName specified. |
java.util.Enumeration |
getEnumeration()
Returns an Enumeration of all the VacmGroupAccessEntry objects
maintained in this class. |
void |
removeAllEntries()
Removes all the VacmGroupAccessEntry Objects maintained
by this class. |
void |
removeEntry(VacmAccessEntry accessEntry,
byte[] groupName)
Removes the specified VacmAccessEntry object from the list of
VacmAccessEntry objects in VacmGroupAccessEntry. |
void |
serialize(java.io.ObjectOutputStream out)
Stores the VacmGroupAccess entries in the file GrpAccessEntry |
(package private) void |
setDBOperations(com.adventnet.utils.DatabaseOperations d)
|
(package private) void |
setV3DatabaseFlag(boolean dbFlag)
|
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
GROUPNAME
static final int GROUPNAME
CONTEXTPREFIX
static final int CONTEXTPREFIX
SECURITYMODEL
static final int SECURITYMODEL
SECURITYLEVEL
static final int SECURITYLEVEL
CONTEXTMATCH
static final int CONTEXTMATCH
READVIEWNAME
static final int READVIEWNAME
WRITEVIEWNAME
static final int WRITEVIEWNAME
NOTIFYVIEWNAME
static final int NOTIFYVIEWNAME
STORAGETYPE
static final int STORAGETYPE
ROWSTATUS
static final int ROWSTATUS
groupAccessTable
java.util.Hashtable groupAccessTable
- HashTable which maps the GroupName to VacmGroupAccessEntry objects
VacmGroupAccessTable
VacmGroupAccessTable()
setDBOperations
void setDBOperations(com.adventnet.utils.DatabaseOperations d)
setV3DatabaseFlag
void setV3DatabaseFlag(boolean dbFlag)
addEntry
public boolean addEntry(VacmAccessEntry accessEntry,
byte[] groupName)
- Adds the VacmAccessEntry object to the list of VacmAccessEntry
objects in the VacmGroupAccessEntry. This method creates a new
VacmGroupAccessEntry object if required and adds the VacmAccessEntry
object to the list of VacmAccessEntry objects it maintains. It
also adds the VacmGroupAccessEntry object to the list of
VacmGroupAccessEntry objects maintained by this class.
- Parameters:
accessEntry - The VacmAccessEntry object to be added.groupName - The VacmGroupName corresponding to which the access
entry is to be added- Returns:
- true if the entry is added successfully, false otherwise.
returns false if the input VacmAccessEntry or groupName is null.
removeAllEntries
public void removeAllEntries()
- Removes all the VacmGroupAccessEntry Objects maintained
by this class. Thus the list of VacmGroupAccessEntry objects will
be null
getEnumeration
public java.util.Enumeration getEnumeration()
- Returns an Enumeration of all the VacmGroupAccessEntry objects
maintained in this class.
- Returns:
- The enumeration of all the VacmGroupAccessEntry objects
in this class.
removeEntry
public void removeEntry(VacmAccessEntry accessEntry,
byte[] groupName)
- Removes the specified VacmAccessEntry object from the list of
VacmAccessEntry objects in VacmGroupAccessEntry. It also removes
the VacmGroupAccessEntry from the list of VacmGroupAccessEntry
objects in this class if the VacmGroupAccessEntry does not have
any VacmAccessEntry objects.
- Parameters:
accessEntry - The VacmAccessEntry to be removed.groupName - The VacmGroupName associated with
VacmGroupAccessEntry for which the VacmAccessEntry is to be removed.
getEntry
public VacmGroupAccessEntry getEntry(byte[] groupName)
- Returns the VacmGroupAccessEntry object corresponding to the
groupName specified.
- Parameters:
groupName - The VacmGroupName for which the VacmGroupAccessEntry
object is to be returned.- Returns:
- VacmGroupAccessEntry object corresponding to the groupName otherwise
return null if the groupName is null or corresponding VacmGroupAccessEntry
object is not present in the VacmGroupAccessTable object.
serialize
public void serialize(java.io.ObjectOutputStream out)
- Stores the VacmGroupAccess entries in the file GrpAccessEntry
deSerialize
public void deSerialize(java.io.ObjectInputStream in)
- Retrives the VacmGroupAccess entries from the file VacmGroupAccessEntry to the GrpAccessTable