com.adventnet.snmp.snmp2.vacm
Class VacmViewTreeTable

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.vacm.VacmViewTreeTable

public class VacmViewTreeTable
extends java.lang.Object

This class maintains a list of VacmViewTreeEntry Objects. It provides methods to get entry,add and remove VacmViewTreeEntry objects. Once a VacmFamilyEntry is created, it has to be added using the addEntry method provided in this class. The API user need not instantiate this class as it is instantiated by the SnmpAPI constructor. The SnmpAPI provides methods to access this VacmViewTreeTable.

See Also:
SnmpAPI

Method Summary
 boolean addEntry(VacmFamilyEntry familyEntry11, byte[] familyName, int lock)
          Adds the VacmFamilyEntry object to the list of VacmFamilyEntry objects in the VacmViewTreeEntry.
 void deSerialize(java.io.ObjectInputStream in)
           
 VacmViewTreeEntry getEntry(byte[] familyName)
          Returns the VacmViewTreeentry corresponding to the particular familyName specified.
 java.util.Enumeration getEnumeration()
          Returns an enumeration of all the VacmViewTreeEntry objects maintained by this class.
 int getSpinLock()
          Get the spinlock value.
 void removeAllEntries()
          Removes all the VacmViewTreeEntry objects maintained by this class.
 boolean removeEntry(VacmFamilyEntry familyEntry, byte[] familyName, int lock)
          Removes the specified VacmFamilyEntry from the list of VacmFamilyEntry objects in VacmViewTreeEntry.
 void serialize(java.io.ObjectOutputStream out)
          Stores the VacmViewTree entries in the file FamilyEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSpinLock

public int getSpinLock()
Get the spinlock value. The spinlock should be used while adding and removing entry VacmViewTreeEntry Objects.
Returns:
The spinLock value.

getEnumeration

public java.util.Enumeration getEnumeration()
Returns an enumeration of all the VacmViewTreeEntry objects maintained by this class.
Returns:
The enumeration of all the VacmViewTreeEntry objects in this class.

removeAllEntries

public void removeAllEntries()
Removes all the VacmViewTreeEntry objects maintained by this class.

addEntry

public boolean addEntry(VacmFamilyEntry familyEntry11,
                        byte[] familyName,
                        int lock)
Adds the VacmFamilyEntry object to the list of VacmFamilyEntry objects in the VacmViewTreeEntry. This method creates a new VacmViewTreeEntry object if required and adds the VacmFamilyEntry object to the list of VacmFamilyEntry objects it maintains. It also adds the VacmViewTreeEntry object to the list of VacmViewTreeEntry objects maintained in this class. The spinlock should be retrived and passed as parameter.
Parameters:
familyEntry11 - The VacmFamilyEntry object to be added.
familyName - The FamilyName corresponding to which the family entry is to be added
lock - The spinlock value
Returns:
True if the familyEntry is added successfully. False if the spinlock value is incorrect

getEntry

public VacmViewTreeEntry getEntry(byte[] familyName)
Returns the VacmViewTreeentry corresponding to the particular familyName specified.
Parameters:
familyName - The FamilyViewName for which the VacmViewTreeEntry object is to be returned.
Returns:
The VacmViewTreeEntry object corresponding to the familyName specified.

removeEntry

public boolean removeEntry(VacmFamilyEntry familyEntry,
                           byte[] familyName,
                           int lock)
Removes the specified VacmFamilyEntry from the list of VacmFamilyEntry objects in VacmViewTreeEntry. It also removes the VacmViewTreeEntry from the list of VacmViewTreeEntry objects in this class if the VacmViewTreeEntry does not have any VacmFamilyEntry objects. The spinlock value has to retrived and passed as a parameter.
Parameters:
familyEntry - The VacmFamilyEntry object to be removed.
familyName - The familyViewName associated with the VacmViewTreeEntry for which the VacmFamilyEntry is to be removed.
lock - The spinlock value.
Returns:
True if the entry is removed successfully. False if the spinlock value is incorrect

serialize

public void serialize(java.io.ObjectOutputStream out)
Stores the VacmViewTree entries in the file FamilyEntry

deSerialize

public void deSerialize(java.io.ObjectInputStream in)


Copyright (c)AdventNet Inc., 1996-2004