This class is to provide common Acl Authentication to both the
standalone SnmpAgent and multiprocol SnmpAgent - SnmpAdaptor
This class provides methods to store the AclTable Entries in the
UserPreferred format - XML, Text File and Runtime Memory.
|
Constructor Summary |
AclTable(SnmpAgent agentRef)
The Default Constructor without persistence storage option. |
AclTable(SnmpAgent agentRef,
java.lang.String name,
java.lang.String format)
The Constructor with persistence storage option. |
|
Method Summary |
boolean |
addAclEntry(AclEntryInterface entry)
This method Adds the given entry to the Agent Community Authentication
Vector. |
protected AclTableFileToVector |
getAclTableFileToVector()
Method to get the AclTableFileToVector instance associated with
this class. |
boolean |
isStorage()
Method to know whether this class has storage option or not. |
void |
setStorage(boolean isStorage)
Method to set the Storage option on or off. |
void |
storeData()
This method will be called after the addition of an Entry in the
AclTable so that the Entry will be persisted as per the StorageType. |
protected void |
storeData(java.lang.String storageType)
The method to store the Table entries in the specified format. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
agentName
SnmpAgent agentName
storage
boolean storage
storageType
java.lang.String storageType
fileName
java.lang.String fileName
aclWriter
AclTableFileToVector aclWriter
AclTable
public AclTable(SnmpAgent agentRef)
- The Default Constructor without persistence storage option.
- Parameters:
agentRef - the SnmpAgent Reference.
AclTable
public AclTable(SnmpAgent agentRef,
java.lang.String name,
java.lang.String format)
- The Constructor with persistence storage option.
- Parameters:
agentRef - the SnmpAgent Reference.name - the fileName from where the entries are to be
populated and stored, default will be-AccessControlTable.xmlformat - The file format default will be "xml"(eg., "Text" for
Flat Text File format)
addAclEntry
public boolean addAclEntry(AclEntryInterface entry)
- This method Adds the given entry to the Agent Community Authentication
Vector.
- Overrides:
- addAclEntry in class BaseAclTable
- Parameters:
entry - The AclEntry instance.- Returns:
- boolean specifying whether the entry is successfully added
or not.
storeData
protected void storeData(java.lang.String storageType)
- The method to store the Table entries in the specified format.
API users need not use this method.
- Parameters:
storageType - the StorageType string (eg., "xml" for XML storage).
storeData
public void storeData()
- This method will be called after the addition of an Entry in the
AclTable so that the Entry will be persisted as per the StorageType.
If the storage flag is not set prior to this, the Entries will not
be persisted.
isStorage
public boolean isStorage()
- Method to know whether this class has storage option or not.
- Returns:
- boolean - true if storage has been set earlier else a false.
setStorage
public void setStorage(boolean isStorage)
- Method to set the Storage option on or off.
- Parameters:
isStorage - - true to turn on the Storage option and
false to turn off the same.
getAclTableFileToVector
protected AclTableFileToVector getAclTableFileToVector()
- Method to get the AclTableFileToVector instance associated with
this class.
- Returns:
- the AclTableFileToVector instance if exists else a null.