com.adventnet.snmp.snmp2.agent
Class AclTableRequestHandler

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
        |
        +--com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
              |
              +--com.adventnet.snmp.snmp2.agent.BaseAclTableRequestHandler
                    |
                    +--com.adventnet.snmp.snmp2.agent.AclTableRequestHandler

public class AclTableRequestHandler
extends BaseAclTableRequestHandler

This is required if you want to give Remote Configuration Access for the aclTable. Handles all requests for aclTable(in AGENT-SNMP-CONFIG-MIB) used for v1/v2c agent access control. This class allows us to configure the aclTable at run-time by snmp-sets.


Field Summary
(package private)  java.lang.String aclFileName
           
 AclTable aclTable
           
(package private)  java.lang.Thread aclThread
           
protected  SnmpAgent agentName
           
(package private)  java.lang.String dirStr
           
(package private)  AclTableFileToVector fileToVector
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseAclTableRequestHandler
ACLACCESS, ACLCOMMUNITY, ACLMANAGERS, ACLSTATUS, aclTable, COLUMNCOUNT
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
agentName, listenerList, tModelComplete
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener, writeEachTime
 
Constructor Summary
AclTableRequestHandler(SnmpAgent agentRef, AclTable table)
          The primary constructor to AclTableRequestHandler This constructor gets the agent reference to which this community table should associate with and the AclTable which needs remote configuration.
AclTableRequestHandler(SnmpAgent agentRef, boolean persistence)
          Deprecated. As persistence details are handled in the AclTable. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with.
AclTableRequestHandler(SnmpAgent agentRef, java.lang.String communityTableDirName, java.lang.String communityTableFileName)
          Deprecated. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with. The communityTableDirName and the communityTableFileName specifies the path of community table by which the agent gets initialised during start-up
AclTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, boolean fToVPersistence)
          Deprecated. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with.
 
Method Summary
 java.lang.String getFileName()
          Deprecated. fileNames can also be specified in the AclTable class. Getter for the fileName string of the file storing acl entries.
 boolean isPersistence()
          Deprecated. Persistence can be set and got from the AclTable. Gettter for file persistence of Access Control values in the fileSystem
 void setAutoRefresh(boolean flag)
          The method which sets the auto refresh flag with the default auto refresh time(1 min.).
 void setAutoRefresh(boolean flag, int autoRefreshTimeInt)
          The method which sets the auto refresh flag with the custom auto refresh time.
 void setFileName(java.lang.String fileName)
          Deprecated. as file names can be specified in the AclTable constructor itself. Setter for fileName to store the acl entries
 void setFToVPersistence(boolean fToVPersistence)
          Deprecated. use the AclTable to set the persistence options. Setter for FToV persistence of AccessControlTable.txt.
 void setPersistence(boolean flag)
          Deprecated. as persistence can be set with the AclTable itself. Setter for persistence of Community Access values in fileSystem
 void setTableVector(java.util.Vector tableVector)
          Setter for the Table Vector.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseAclTableRequestHandler
checkForRowStatus, createAclEntry, createAclEntry, createAclEntry, getAclEntryInstance, getAclTableOidRep, getOidRep, getRegisteredOid, getSubidList, processGetNextRequest, processGetRequest, processGetRequest, processSetRequest, setOidRep, setRegisteredOid
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
addChangeListener, createChangeEvent, fireChangeEvent, getTableVector, removeChangeListener
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
addInstrumentHandler, addRegistrationListener, addTableListener, addUpdateListener, getInstrument, getMibVarHash, getNextRequest, getObjectHash, getObjectTypeHash, getRequest, getTableListener, isWriteEachTime, processGetNextRequest, processGetRequest, processSetRequest, removeRegistrationListener, removeUpdateListener, setRequest, setWriteEachTime, writeIntoFile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aclThread

java.lang.Thread aclThread

dirStr

java.lang.String dirStr

aclFileName

java.lang.String aclFileName

aclTable

public AclTable aclTable

agentName

protected SnmpAgent agentName

fileToVector

AclTableFileToVector fileToVector
Constructor Detail

AclTableRequestHandler

public AclTableRequestHandler(SnmpAgent agentRef,
                              java.lang.String communityTableDirName,
                              java.lang.String communityTableFileName)
Deprecated. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with. The communityTableDirName and the communityTableFileName specifies the path of community table by which the agent gets initialised during start-up

Parameters:
agentRef - The SnmpAgent reference
communityTableDirName - The table's persistence directory Name
communityTablleFileName - The table's persistence file Name
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

AclTableRequestHandler

public AclTableRequestHandler(SnmpAgent agentRef,
                              boolean persistence)
Deprecated. As persistence details are handled in the AclTable. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with.

Parameters:
agentRef - The Snmp Agent reference.
persistence - Specifies the persistency of the AccessControlTable.xml in the fileSystem.
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

AclTableRequestHandler

public AclTableRequestHandler(SnmpAgent agentRef,
                              java.lang.String dirStr,
                              java.lang.String fileName,
                              boolean fToVPersistence)
Deprecated. Make use of the AclTable arg constructor. This constructor gets the agent reference to which this community table should associate with.

Parameters:
agentRef - The Snmp Agent Reference.
dirStr - The complete path of the File specified.
fileName - The file Name required.
fToVPersistence - specifies the type of persistence
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

AclTableRequestHandler

public AclTableRequestHandler(SnmpAgent agentRef,
                              AclTable table)
The primary constructor to AclTableRequestHandler This constructor gets the agent reference to which this community table should associate with and the AclTable which needs remote configuration.
Parameters:
agentRef - The Snmp Agent Reference.
table - The AclTable instance associated with the Agent.
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0
Method Detail

setAutoRefresh

public void setAutoRefresh(boolean flag)
The method which sets the auto refresh flag with the default auto refresh time(1 min.).
Parameters:
flag - specifies the auto refresh flag

setAutoRefresh

public void setAutoRefresh(boolean flag,
                           int autoRefreshTimeInt)
The method which sets the auto refresh flag with the custom auto refresh time.
Parameters:
flag - specifies the auto refresh flag
autoRefreshTimeInt - specifies the custom auto refresh time in seconds

setPersistence

public void setPersistence(boolean flag)
Deprecated. as persistence can be set with the AclTable itself. Setter for persistence of Community Access values in fileSystem

Parameters:
flag - specifies the persistence flag for storing the Access Control values in the fileSystem
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

isPersistence

public boolean isPersistence()
Deprecated. Persistence can be set and got from the AclTable. Gettter for file persistence of Access Control values in the fileSystem

Returns:
The persistence flag - true by default
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

setTableVector

public void setTableVector(java.util.Vector tableVector)
Deprecated. use the method in the AclTable Setter for TableVector

Description copied from class: BaseTableRequestHandler
Setter for the Table Vector.
Overrides:
setTableVector in class BaseAclTableRequestHandler
Parameters:
tableVector - The TableVector of Entry objects
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

setFToVPersistence

public void setFToVPersistence(boolean fToVPersistence)
Deprecated. use the AclTable to set the persistence options. Setter for FToV persistence of AccessControlTable.txt.

Parameters:
fToVPersistence - The FToV Persistence flag specifying the FToV format or the XML format of persistence.
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

setFileName

public void setFileName(java.lang.String fileName)
Deprecated. as file names can be specified in the AclTable constructor itself. Setter for fileName to store the acl entries

Parameters:
fileName - The fileName for AclEntries with absolute or relative path.
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0

getFileName

public java.lang.String getFileName()
Deprecated. fileNames can also be specified in the AclTable class. Getter for the fileName string of the file storing acl entries.

Returns:
The file name with the absolute or relative path.
Since:
AdventNet Agent Toolkit (Java/JMX Edition) 5.0