com.adventnet.snmp.snmp2.agent
Class BaseAclTable

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.BaseAclTable
Direct Known Subclasses:
AclTable

public class BaseAclTable
extends java.lang.Object

This class is to provide common Acl Authentication to both the standalone SnmpAgent, J2ME-SNMP Agent and multiprocol SnmpAgent - SnmpAdaptor

This class provides methods to store the AclTable Entries in the Runtime Memory.Both AclTable and MicroAclTable extends this class and make use of the methods available in this class.

See Also:
AclTable, MicroAclTable

Field Summary
(package private)  AclEntry aclEntry
           
 java.util.Vector aclVec
           
(package private)  boolean modified
           
 
Constructor Summary
BaseAclTable()
           
 
Method Summary
 boolean addAclEntry(AclEntryInterface entry)
          This method Adds the given entry to the Agent Community Authentication Vector.
 AclEntryInterface getAclEntry(java.lang.String community)
          The method to get the AclEntry instance corresponding to the given community String.
 AclEntry getAclEntryInstance()
          API users can override this method to have their own AclEntryInterface.
 java.util.Vector getTableVector()
          Method to retrieve the number of Entries in the AclTable.
 boolean isModified()
          The method for knowing whether the AclEntries were modified.
 void setModified(boolean isModified)
          Method to set the FailOver Flag.
 void setTableVector(java.util.Vector tableVector)
          Method to set the Vector of AclEntries.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aclEntry

AclEntry aclEntry

modified

boolean modified

aclVec

public java.util.Vector aclVec
Constructor Detail

BaseAclTable

public BaseAclTable()
Method Detail

addAclEntry

public boolean addAclEntry(AclEntryInterface entry)
This method Adds the given entry to the Agent Community Authentication Vector.
Parameters:
entry - The AclEntry instance.
Returns:
boolean specifying whether the entry is successfully added or not.

getAclEntry

public AclEntryInterface getAclEntry(java.lang.String community)
The method to get the AclEntry instance corresponding to the given community String.
Parameters:
community - The community String for the entry to be retrieved.
Returns:
The AclEntry if present else a null.

getTableVector

public java.util.Vector getTableVector()
Method to retrieve the number of Entries in the AclTable.
Returns:
The Vector of AclEntry Objects.

setTableVector

public void setTableVector(java.util.Vector tableVector)
Method to set the Vector of AclEntries.
Parameters:
tableVector - - the Vector containing AclEntry Objects sorted according to their Instance.

getAclEntryInstance

public AclEntry getAclEntryInstance()
API users can override this method to have their own AclEntryInterface. This method will be called for all AclEntry instance creation.
Returns:
The new AclEntry Object.

setModified

public void setModified(boolean isModified)
Method to set the FailOver Flag. This will be used within the API. API Users need not use this method.
Parameters:
isModified - The boolean specifying whether the Table Entries were changed.
See Also:
isModified()

isModified

public boolean isModified()
The method for knowing whether the AclEntries were modified.
Returns:
boolean - true stating the Table has been modified remotely else a false.
See Also:
setModified(boolean isModified)