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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright (c)AdventNet Inc., 1996-2004