com.adventnet.snmp.snmp2.agent
Class V3XMLToVector
java.lang.Object
|
+--com.adventnet.snmp.snmp2.agent.XMLToVector
|
+--com.adventnet.snmp.snmp2.agent.V3XMLToVector
- public class V3XMLToVector
- extends XMLToVector
- implements UpdateListener
This class contains the Persistency data handling of the V3TrapForwardingTable
| Fields inherited from class com.adventnet.snmp.snmp2.agent.XMLToVector |
columnNames,
COMMUNITY,
fieldSeparator,
forTable,
fToVPersistence,
handler,
lastModified,
MANAGERHOST,
MANAGERHOSTTYPE,
MANAGERPORT,
name,
refreshTime,
RETRIES,
ROWSTATUS,
tableVector,
TIMEOUT,
VERSION |
|
Constructor Summary |
V3XMLToVector(java.lang.String dirStr,
java.lang.String fileName)
This is the primary constructor with speification of directory name and
fileName |
V3XMLToVector(java.lang.String dirStr,
java.lang.String fileName,
V3ForwardingTable table,
boolean ftv)
This constructor with speification of directory name, fileName,
V3ForwardingTable and the Storage Type. |
|
Method Summary |
static int |
getColumnId(java.lang.String name)
The static method returning the column name's column subid |
java.lang.String |
getColumnValue(V3ForwardingEntry entry,
java.lang.String columnName)
This mehod returns the Column value for the specified Entry |
protected void |
readFromFile()
The method parses the Entry objects from the persistence file in the fileSystem |
void |
run()
This is the actual run method of the Thread used for refreshing the V3TrapForwardingTable |
void |
setForwardingTableRequestHandler(SimpleTrapForwardingTable handler)
The method to set the V3SimpleTrapForwardingTable |
void |
writeIntoFile()
The method writes the Entry objects into the file in specified Format |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
V3MANAGERHOSTTYPE
static final int V3MANAGERHOSTTYPE
- Static ints of the column subids
MANAGERHOST
static final int MANAGERHOST
MANAGERPORT
static final int MANAGERPORT
MANAGERVERSION
static final int MANAGERVERSION
MANAGERCOMMUNITY
static final int MANAGERCOMMUNITY
V3MANAGERUSERNAME
static final int V3MANAGERUSERNAME
V3MANAGERUSERSECMODEL
static final int V3MANAGERUSERSECMODEL
V3SECURITYLEVEL
static final int V3SECURITYLEVEL
V3MANAGERUSERCONTEXTNAME
static final int V3MANAGERUSERCONTEXTNAME
MANAGERTIMEOUT
static final int MANAGERTIMEOUT
MANAGERRETRIES
static final int MANAGERRETRIES
ROWSTATUS
static final int ROWSTATUS
columnNames
static final java.lang.String[] columnNames
- The static names of the columns
v3Table
V3ForwardingTable v3Table
V3XMLToVector
public V3XMLToVector(java.lang.String dirStr,
java.lang.String fileName)
- This is the primary constructor with speification of directory name and
fileName
- Parameters:
dirStr - the directory location of the storage file.fileName - the fileName.
V3XMLToVector
public V3XMLToVector(java.lang.String dirStr,
java.lang.String fileName,
V3ForwardingTable table,
boolean ftv)
- This constructor with speification of directory name, fileName,
V3ForwardingTable and the Storage Type.
- Parameters:
dirStr - the directory location of the storage file.fileName - the fileName.table - the V3ForwardingTable whose entries are to be stored.ftv - boolean to specify text or xml format true for text format.
getColumnId
public static int getColumnId(java.lang.String name)
- The static method returning the column name's column subid
- Parameters:
name - the Column Name- Returns:
- The column id int
getColumnValue
public java.lang.String getColumnValue(V3ForwardingEntry entry,
java.lang.String columnName)
- This mehod returns the Column value for the specified Entry
- Parameters:
entry - The Entry for which the column value is neededcolumnName - The columnName of the value needed- Returns:
- The value of the columnName in the given Entry
readFromFile
protected void readFromFile()
throws java.lang.Exception
- The method parses the Entry objects from the persistence file in the fileSystem
- Overrides:
- readFromFile in class XMLToVector
- Throws:
- java.lang.Exception - on error
writeIntoFile
public void writeIntoFile()
- The method writes the Entry objects into the file in specified Format
- Specified by:
- writeIntoFile in interface UpdateListener
- Overrides:
- writeIntoFile in class XMLToVector
setForwardingTableRequestHandler
public void setForwardingTableRequestHandler(SimpleTrapForwardingTable handler)
- The method to set the V3SimpleTrapForwardingTable
- Overrides:
- setForwardingTableRequestHandler in class XMLToVector
- Parameters:
handler - The SimpleTrapForwardingTable handler for this class.
run
public void run()
- This is the actual run method of the Thread used for refreshing the V3TrapForwardingTable
- Overrides:
- run in class XMLToVector