com.adventnet.snmp.snmp2
Class SecurityModelTable

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SecurityModelTable
Direct Known Subclasses:
SnmpCommunityTable, USMUserTable

public abstract class SecurityModelTable
extends java.lang.Object

This is an abstract class which contains a list of SecurityModelEntry objects belonging to a particular securityModel. API users should extend this class to implement their own security model. This class contains the list of SecurityModelEntry objects belonging to a particular security model. For example in the implementation of USM Security Model the USMUserTable class maintains a list of all USMUserEntry objects and provides methods to operate on the list. Once this class is extended to provide the implementation, there is no need to instantiate that class. Once the security model is registered, the API will instatiate it. The SecurityProvider has methods to get the implemented SecurityModelTable instance. This class has abstract methods to add, modify, delete, the SecurityModel entries.

See Also:
SecurityProvider, SecurityModelEntry

Constructor Summary
SecurityModelTable()
           
 
Method Summary
abstract  boolean addEntry(SecurityModelEntry entry)
          Method to add a new SecurityModelEntry entry to the list of SecurityModel entries maintaied by this class.
abstract  void deSerialize(java.io.ObjectInputStream in)
          DeSerializes the SecurityModelEntry objects from the particular input Stream.
abstract  SecurityModelEntry getEntry(java.lang.Object key)
          Returns a particular SecurityModel entry from the list of SecurityModel entries based on the keys .
abstract  java.util.Enumeration getEnumeration()
          Returns an enumeration of all the SecurityModelTable objects maintaied in this class.
abstract  boolean modifyEntry(SecurityModelEntry entry)
          This method should locate an entry using the key specified in the argument entry and modify the non-key parameters that are available in entry
abstract  boolean removeEntry(SecurityModelEntry entry)
          Removes a particular entry from the list of SecurityModel entries.
abstract  void serialize(java.io.ObjectOutputStream out)
          Serializes the list of SecurityModelEntry objects into particular output Stream specified.
protected  void setDBOperations(com.adventnet.utils.DatabaseOperations db)
          This method enables the users to set the their own implementation of the "DatabaseOperations" interface.
 void setV3ConfigFlag(boolean config)
          Enables/disables the V3 Configuration flag.This flag should be enabled when the user needs to use a configuration table in the case of V3 database.
 void setV3DatabaseFlag(boolean dBase)
          Enables/disables the v3 database flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityModelTable

public SecurityModelTable()
Method Detail

addEntry

public abstract boolean addEntry(SecurityModelEntry entry)
Method to add a new SecurityModelEntry entry to the list of SecurityModel entries maintaied by this class.
Parameters:
entry - The SecurityModelEntry to be added.
Returns:
true if the SecurityModelEntry was properly added. False otherwise.

modifyEntry

public abstract boolean modifyEntry(SecurityModelEntry entry)
This method should locate an entry using the key specified in the argument entry and modify the non-key parameters that are available in entry

removeEntry

public abstract boolean removeEntry(SecurityModelEntry entry)
Removes a particular entry from the list of SecurityModel entries.

getEntry

public abstract SecurityModelEntry getEntry(java.lang.Object key)
Returns a particular SecurityModel entry from the list of SecurityModel entries based on the keys .

getEnumeration

public abstract java.util.Enumeration getEnumeration()
Returns an enumeration of all the SecurityModelTable objects maintaied in this class.

serialize

public abstract void serialize(java.io.ObjectOutputStream out)
Serializes the list of SecurityModelEntry objects into particular output Stream specified.

deSerialize

public abstract void deSerialize(java.io.ObjectInputStream in)
DeSerializes the SecurityModelEntry objects from the particular input Stream.

setV3DatabaseFlag

public void setV3DatabaseFlag(boolean dBase)
Enables/disables the v3 database flag.
Parameters:
dBase - the boolean value to be set. By default this value is false. This is a dummy implemented method. API users who do database operations can overwrite this method.

setV3ConfigFlag

public void setV3ConfigFlag(boolean config)
Enables/disables the V3 Configuration flag.This flag should be enabled when the user needs to use a configuration table in the case of V3 database.
Parameters:
config - the boolean value to be set. By default this flag is false. This is a dummy implemented method. API users who do database operations can overwrite this method.

setDBOperations

protected void setDBOperations(com.adventnet.utils.DatabaseOperations db)
This method enables the users to set the their own implementation of the "DatabaseOperations" interface. After setting this, all the database operations will bbe executed from this interface.
Parameters:
db - the instance of the implemented "DatabaseOperations" class. This is a dummy implemented method. API users who do database operations can overwrite this method.


Copyright (c)AdventNet Inc., 1996-2004