|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.utils.agent.AgentTableModel
The AgentTableModel insulates the user from low level SNMP operations and storing of data in case of SNMP Tables
This is especially useful during SNMP Get Next where user need not store data
| Field Summary | |
(package private) TableModelListener |
modelListener
|
(package private) int |
noOfColumns
|
(package private) int |
rowStatusPos
|
| Constructor Summary | |
AgentTableModel()
Constructor for AgentTableModel |
|
| Method Summary | |
void |
addRow(TableEntry tbl)
Adds (TableEntry) the row to the Table Model. |
void |
addTableModelListener(TableModelListener modelListener)
This method adds the Table Model Listener. |
void |
deleteRow(int[] inst)
Deletes the row from the Model specified by the instanceOID. |
void |
deleteRow(TableEntry tbl)
Deletes the row from the Model specified by the TableEntry. |
int |
findExactLocation(int[] prevOid)
Method to find the Exact Location of the instance. |
int |
findInsertLocation(int[] prevOid)
Returns the index at which the new Entry of instance OID prevOid has to be inserted (Uses Binary Search ). |
int |
findNextLocation(int[] prevOid)
This method is to find the Next Location of the index. |
TableEntry |
get(int[] inst)
API users would have to provide the instance oid for the Entry(Table Row). |
TableEntry |
getEntryAt(int index)
This method is the Getter for the Table entry Values. |
TableEntry |
getFirstEntry()
Method to Obtain the First entry of the Table. |
TableEntry |
getLastEntry()
Method to Obtain the Last Entry from the Table Model. |
TableEntry |
getNext(int[] inst)
Gets the next Element after this instance. |
TableEntry |
getNextEntry(TableEntry entry)
Get the next Entry form the Table Model. |
java.util.Vector |
getTableElements()
Getter for the TableElements from the TableModel. |
void |
insertRow(TableEntry tbl)
Inserts (TableEntry) the row to the Table Model. |
(package private) void |
printEntryList()
|
void |
removeTableModelListener()
This method Removes the Table Model Listener. |
void |
setTableElements(java.util.Vector tableElements)
Sets The Table Entries to the Table Model. |
int |
size()
Number of rows in the Model. |
void |
tableDeleteRow(int[] inst)
Deletes the row from the Model specified by the OID. |
void |
tableDeleteRow(TableEntry tbl)
Deletes the row from the Model specified by the TableEntry. |
TableEntry |
tableGet(int[] inst)
Method to get the Table Entry Object. |
TableEntry |
tableGetNext(int[] prevOid)
Gets the next Element after this instance. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int noOfColumns
int rowStatusPos
TableModelListener modelListener
| Constructor Detail |
public AgentTableModel()
| Method Detail |
public void setTableElements(java.util.Vector tableElements)
tableElements - The Table Elements to set.public java.util.Vector getTableElements()
public void addRow(TableEntry tbl)
throws AgentSnmpException
tbl - The row to be added.
public void deleteRow(TableEntry tbl)
throws AgentSnmpException
tbl - The row to be Deleted from the Table.
public void deleteRow(int[] inst)
throws AgentSnmpException
The - instanceOid Value.public TableEntry getFirstEntry()
public TableEntry getLastEntry()
public TableEntry getEntryAt(int index)
index - The Table Entry Index.public int size()
public TableEntry get(int[] inst)
inst - The instance OID of the Table row.public TableEntry getNext(int[] inst)
inst - The Instance whose next entry is needed.public TableEntry getNextEntry(TableEntry entry)
entry - The Entry Value whose nextEntry is needed.void printEntryList()
public void addTableModelListener(TableModelListener modelListener)
modelListener - The Listener to be added.public void removeTableModelListener()
public void insertRow(TableEntry tbl)
throws AgentSnmpException
tbl - The Row Entry to be Inserted.public int findInsertLocation(int[] prevOid)
PrevOid - The prevOid.public TableEntry tableGetNext(int[] prevOid)
prevOid - The Oid whose next entry is needed.public int findNextLocation(int[] prevOid)
prevOid - Oid for which GetNext Request has come .
WARNING : This function does not have direct capability
to indicate failure.
How to check failure :
if integer returned is outOfBoundsIndex( i mean
vector size is 3 but integer returned is 4 0r -1 )
it means that "THERE IS NO ENTRY with instance > prevOid
(incoming parameter ) "public int findExactLocation(int[] prevOid)
prevOid - The Oid for which the Location is required.public TableEntry tableGet(int[] inst)
inst[] - The Table instance to get the entry.
public void tableDeleteRow(TableEntry tbl)
throws AgentSnmpException
tbl - The table entry specification for deletion.
public void tableDeleteRow(int[] inst)
throws AgentSnmpException
inst - The instance Oid specification for deletion.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||