|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.utils.btree.TreeFramework
|
+--com.adventnet.snmp.snmp2.agent.AgentTree
This tree holds AgentNodes which are identified by PduRequestHandler.
This tree holds all the nodes associated with the Oids that are registered with the PduRequestHandler by the VarBindRequestListeners. The registration with PduRequestHandler can be with subidlist as null or with subids specified.
If subidlist is null, then any incoming oid which falls in the registered oid tree will be given to that VarBindRequestListener (provided no other listener registered specifically for the incoming oid).
For example, if a listener L1 is registered for mib-2 (.1.3.6.1.2.1) and L2 for sysName(.1.3.6.1.2.1.1.5). If the incoming oid is for sysUpTime(.1.3.6.1.2.1.1.3) then listener L1 is called.(i.e any oid with in mib-2 and sysName will be given to the listener L1). If incoming oid is .1.3.6.1.2.1.1.5 , then listener L2 will be called.
AgentNode| Field Summary | |
java.util.Vector |
holderVector
The vector containing the list of Holders registered in this Tree. |
(package private) static int |
noOfRecCount
|
| Fields inherited from class com.adventnet.utils.btree.TreeFramework |
elementCount,
root |
| Constructor Summary | |
AgentTree()
No arg constructor for AgentTree preloads .1 as root |
|
AgentTree(int i)
The constructor for AgentTree with the root as argument. |
|
| Method Summary | |
void |
addCell(com.adventnet.utils.btree.TreeCell cell)
add a AgentNode. |
void |
addCell(com.adventnet.utils.btree.TreeCell cell,
com.adventnet.utils.btree.TreeCell parent)
add a AgentNode. |
com.adventnet.utils.btree.TreeCell |
getCell(java.lang.Object key1)
Getter for the cell with the given key Override this method if there are any specific considerations |
com.adventnet.utils.btree.TreeCell |
getCell(java.lang.Object key1,
boolean flag)
Getter for the cell with the given key and request flag Override this method if there are any specific considerations |
com.adventnet.utils.btree.TreeCell |
getHolder(java.lang.Object key)
Method to get the Holder associated with this key. |
(package private) AgentNode |
getLeafNodeInSubTree(AgentNode node)
|
(package private) static int |
getMinSize(int[] oid1,
int[] oid2)
|
(package private) AgentNode |
getNearestLeafNodeInSubTree(AgentNode node,
java.lang.Object oid)
|
com.adventnet.utils.btree.TreeCell |
getNextCell(AgentNode node,
java.lang.Object key)
Getter of the Next cell. |
com.adventnet.utils.btree.TreeCell |
getNextCell(java.lang.Object key)
Getter of the next cell with the given key |
(package private) VarBindRequestListenerHolder |
getNextFailedVarBindRequestListenerHolder(AgentNode node)
This method is called by VarBindRequestListenerManager when a VarBindRequestListener has failed to process a SnmpVarBind |
(package private) AgentNode |
getNextLevelCell(AgentNode node)
|
(package private) AgentNode |
getNextLevelValidCell(AgentNode node)
|
com.adventnet.utils.btree.TreeCell |
getNextRegisteredCell(java.lang.Object key)
Getter of the next cell with the given key with registration in the tree. |
(package private) VarBindRequestListenerHolder |
getNextVarBindRequestListenerHolder(AgentNode node)
|
(package private) VarBindRequestListenerHolder |
getNextVarBindRequestListenerHolder(SnmpVarBind varb)
|
com.adventnet.utils.btree.TreeCell |
getPreviousCell(java.lang.Object key,
boolean previousFlag)
Getter of the previous cell before the given key |
(package private) VarBindRequestListenerHolder |
getVarBindRequestListenerHolder(AgentNode node)
|
(package private) VarBindRequestListenerHolder |
getVarBindRequestListenerHolder(SnmpVarBind varb)
|
void |
printRegistrations()
Utility method which prints the Node Registrations |
void |
printTree()
Utility method which prints the Tree |
protected void |
removeHolderFromVector(AgentNode node)
The method removes a Holder from the Tree Holder Vector. |
protected void |
sortNodes(AgentNode child)
This method is added for Sorting the Nodes that were added to the Holder Vector. |
| Methods inherited from class com.adventnet.utils.btree.TreeFramework |
deleteCell,
deleteCell,
getElements,
getRoot,
incrementElementCount,
setRoot,
size |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public java.util.Vector holderVector
static int noOfRecCount
| Constructor Detail |
public AgentTree()
public AgentTree(int i)
i - - the root to be set.| Method Detail |
public void addCell(com.adventnet.utils.btree.TreeCell cell)
throws java.lang.ClassCastException
cell - the TreeCell to be added
public void addCell(com.adventnet.utils.btree.TreeCell cell,
com.adventnet.utils.btree.TreeCell parent)
throws java.lang.ClassCastException
cell - the child TreeCellparent - the parent TreeCellpublic com.adventnet.utils.btree.TreeCell getCell(java.lang.Object key1)
Object - key of the cell.
public com.adventnet.utils.btree.TreeCell getCell(java.lang.Object key1,
boolean flag)
key1 - Key of the cell.flag - Request Flag for the Proxy options.
public com.adventnet.utils.btree.TreeCell getPreviousCell(java.lang.Object key,
boolean previousFlag)
Object - key of the current cell.previousFlag - The flag determining the recursion,
API should call it using false value.public com.adventnet.utils.btree.TreeCell getNextRegisteredCell(java.lang.Object key)
Object - key of the cell.public com.adventnet.utils.btree.TreeCell getNextCell(java.lang.Object key)
Object - key of the cell.
public com.adventnet.utils.btree.TreeCell getNextCell(AgentNode node,
java.lang.Object key)
node - the Node for which the next is to be gotkey - the key objectAgentNode getNextLevelCell(AgentNode node)
AgentNode getNextLevelValidCell(AgentNode node)
public void printTree()
public void printRegistrations()
VarBindRequestListenerHolder getVarBindRequestListenerHolder(AgentNode node)
VarBindRequestListenerHolder getVarBindRequestListenerHolder(SnmpVarBind varb)
VarBindRequestListenerHolder getNextVarBindRequestListenerHolder(AgentNode node)
VarBindRequestListenerHolder getNextVarBindRequestListenerHolder(SnmpVarBind varb)
VarBindRequestListenerHolder getNextFailedVarBindRequestListenerHolder(AgentNode node)
node - node for which we need to do all our processingAgentNode getLeafNodeInSubTree(AgentNode node)
AgentNode getNearestLeafNodeInSubTree(AgentNode node,
java.lang.Object oid)
protected void sortNodes(AgentNode child)
child - the AgentNode to be added in the Vector.
static int getMinSize(int[] oid1,
int[] oid2)
protected void removeHolderFromVector(AgentNode node)
node - the Node whose Holder has to be removed.public com.adventnet.utils.btree.TreeCell getHolder(java.lang.Object key)
key - - The int[] key for which the TreeCell is to be got.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||