HOME

com.ireasoning.protocol.snmp
Class OIDTreeNode

java.lang.Object
  extended bycom.ireasoning.util.CTreeNode
      extended bycom.ireasoning.util.OrderedTreeNode
          extended bycom.ireasoning.protocol.snmp.BasicOIDTreeNode
              extended bycom.ireasoning.protocol.snmp.OIDTreeNode
All Implemented Interfaces:
Comparable, Serializable

public class OIDTreeNode
extends BasicOIDTreeNode

Tree representing MIB structure. Each node's name is SnmpOID object (getName() method returns SnmpOID object).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ireasoning.protocol.snmp.BasicOIDTreeNode
ACCESS_READ_CREATE, ACCESS_READ_ONLY, ACCESS_READ_WRITE, ACCESSIBLE_FOR_NOTIFY, NOT_ACCESSIBLE
 
Constructor Summary
OIDTreeNode(SnmpOID name)
          Constructor.
OIDTreeNode(SnmpOID name, CTreeNode root)
          Constructor.
OIDTreeNode(String name)
          Constructor.
OIDTreeNode(String name, CTreeNode root)
          Constructor.
 
Method Summary
 CTreeNode addChild(CTreeNode newChild)
          Adds passed child node to the appropriate position, child nodes are ordered.
static OIDTreeNode copyMibTreeNode(MibTreeNode mibNode)
          Deep copy of MibTreeNode instance.
 int getAccess()
          Returns the access code.
 String[] getIndice()
          It only applys to table entry node.
 String getMibNodeName()
          Returns the MIB node name
 Comparable getName()
          Returns an SnmpOID object which is the name of this node
 String getObjectName()
          Returns the MBean object name
 byte getRealSyntaxType()
          Returns the syntax type
 SnmpOID getRowStatusOID()
          Returns the RowStatus column's SnmpOID.
 SnmpTable getSnmpTable()
          Returns the SnmpTable object associated with a MIB table
 boolean isEntryStatus()
          Returns true is this table contains RMON EntryStatus row
 boolean isGroupNode()
          Returns true if this node is a group node
 boolean isIndexNode()
          Returns true if this node is an index node.
 boolean isPartialName()
           
 boolean isRegistered()
          Tests if the MIB table or group is registered or not
 boolean isScalarNode()
          Returns true if this node is a scalar node
 boolean isTableColumnNode()
          Checks if it's a column node in a table, such as IfIndex in IfTable.
 boolean isTableLeafNode()
          Tests if it's a leaf node of a table.
 boolean isTableNode()
          Returns true if this node is a table node, such as IfTable in MIB-II
 boolean isTreeChanged()
           
protected  CTreeNode newInstance(Comparable name, CTreeNode root)
          Creates a new intance of OIDTreeNode
 boolean removeChild(CTreeNode oldChild)
          Removes the immediate child node indicated by oldChild from the list of children
 void setAccess(int access)
          Sets the access code.
 void setAccess(String access)
          Sets the access code
 void setEntryStatus(boolean isEntryStatus)
          Sets if this table contains RMON EntryStatus row or not
 void setGroupNode(boolean b)
          Sets this node to be a group node or not
 boolean setIndexNode(boolean b)
          Sets this node to be an index node or not
 void setIndice(String[] indice)
           
 void setMibNodeName(String name)
          Sets the MIB node name.
 void setObjectName(String val)
          Sets the MBean object name
 void setPartialName(boolean b)
           
 void setRealSyntaxType(byte type)
          Sets the syntax type
 void setRegistered(boolean isRegistered)
          Sets the MIB table or group to be registered or not
 void setRowStatusOID(SnmpOID rowStatusOID)
          Sets the RowStatus column's SnmpOID.
 void setScalarNode(boolean b)
          Sets this node to be a scalar node or not
 void setSnmpTable(SnmpTable table)
          Sets the SnmpTable object associated with a MIB table
 void setTableColumnNode(boolean b)
          Sets this node to be a columnar node or not
 void setTableNode(boolean b)
          Sets this node to be a table node or not
 void setTreeChanged(boolean b)
           
 
Methods inherited from class com.ireasoning.protocol.snmp.BasicOIDTreeNode
getTableEntryObject, isReady, isReadyExpired, setReady, setReady, setTableEntryObject
 
Methods inherited from class com.ireasoning.util.OrderedTreeNode
addChild, appendChild, compareTo, getNext, search
 
Methods inherited from class com.ireasoning.util.CTreeNode
appendChild, appendChild, compareTo, compareTo, compareTo, copy, equals, getChildNode, getChildNodeCount, getChildNodeIndex, getChildNodes, getFirstChild, getLastChild, getLeftMost, getNextSibling, getParent, getPrevSibling, getRawName, getRightMost, getRoot, hashCode, insertBefore, isChildNode, isInSameTree, isLeaf, isRoot, removeChild, removeChild, removeNode, replaceChild, setName, setParent, setRoot, toJTreeNode, toString, traverse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OIDTreeNode

public OIDTreeNode(SnmpOID name)
Constructor. Creates a node with passed name

Parameters:
name - node name

OIDTreeNode

public OIDTreeNode(SnmpOID name,
                   CTreeNode root)
Constructor. Creates a node with passed name

Parameters:
name - node name
root - root node

OIDTreeNode

public OIDTreeNode(String name)
Constructor. Creates a node with passed name

Parameters:
name - node name

OIDTreeNode

public OIDTreeNode(String name,
                   CTreeNode root)
Constructor. Creates a node with passed name

Parameters:
name - node name
root - root node
Method Detail

getName

public Comparable getName()
Returns an SnmpOID object which is the name of this node

Overrides:
getName in class BasicOIDTreeNode

setMibNodeName

public void setMibNodeName(String name)
Sets the MIB node name. Such as "sysUpTime"


getMibNodeName

public String getMibNodeName()
Returns the MIB node name

Overrides:
getMibNodeName in class BasicOIDTreeNode

setObjectName

public void setObjectName(String val)
Sets the MBean object name


getObjectName

public String getObjectName()
Returns the MBean object name

Overrides:
getObjectName in class BasicOIDTreeNode

copyMibTreeNode

public static OIDTreeNode copyMibTreeNode(MibTreeNode mibNode)
Deep copy of MibTreeNode instance.

Returns:
a new instance of whole/sub tree

isScalarNode

public boolean isScalarNode()
Returns true if this node is a scalar node

Overrides:
isScalarNode in class BasicOIDTreeNode

setScalarNode

public void setScalarNode(boolean b)
Sets this node to be a scalar node or not


isTableNode

public boolean isTableNode()
Returns true if this node is a table node, such as IfTable in MIB-II

Overrides:
isTableNode in class BasicOIDTreeNode

setTableNode

public void setTableNode(boolean b)
Sets this node to be a table node or not


isGroupNode

public boolean isGroupNode()
Returns true if this node is a group node

Overrides:
isGroupNode in class BasicOIDTreeNode

setGroupNode

public void setGroupNode(boolean b)
Sets this node to be a group node or not


getIndice

public String[] getIndice()
It only applys to table entry node.

Returns:
table's indices

setIndice

public void setIndice(String[] indice)

isIndexNode

public boolean isIndexNode()
Returns true if this node is an index node. Such as ifIndex in IfTable


setIndexNode

public boolean setIndexNode(boolean b)
Sets this node to be an index node or not


isTableColumnNode

public boolean isTableColumnNode()
Checks if it's a column node in a table, such as IfIndex in IfTable. For mib files, it's the leaf node, but in mib instances, it has child nodes, such as IfIndex.1, IfIndex.2


setTableColumnNode

public void setTableColumnNode(boolean b)
Sets this node to be a columnar node or not


isTableLeafNode

public boolean isTableLeafNode()
Tests if it's a leaf node of a table. In mib file, it's the node such as IfIndex (so it's the same as isTableColumnNode()). But in mib instances, it's the instance node such as IfIndex.1

Overrides:
isTableLeafNode in class BasicOIDTreeNode

getRealSyntaxType

public byte getRealSyntaxType()
Returns the syntax type


setRealSyntaxType

public void setRealSyntaxType(byte type)
Sets the syntax type


newInstance

protected CTreeNode newInstance(Comparable name,
                                CTreeNode root)
Creates a new intance of OIDTreeNode

Overrides:
newInstance in class BasicOIDTreeNode

getSnmpTable

public SnmpTable getSnmpTable()
Returns the SnmpTable object associated with a MIB table

Overrides:
getSnmpTable in class BasicOIDTreeNode

setSnmpTable

public void setSnmpTable(SnmpTable table)
Sets the SnmpTable object associated with a MIB table


getAccess

public int getAccess()
Returns the access code. One of {BasicOIDTreeNode.NOT_ACCESSIBLE, BasicOIDTreeNode.ACCESSIBLE_FOR_NOTIFY, BasicOIDTreeNode.ACCESS_READ_ONLY, BasicOIDTreeNode.ACCESS_READ_WRITE, BasicOIDTreeNode.ACCESS_READ_CREATE}

Overrides:
getAccess in class BasicOIDTreeNode

setAccess

public void setAccess(int access)
Sets the access code. One of {BasicOIDTreeNode.NOT_ACCESSIBLE, BasicOIDTreeNode.ACCESSIBLE_FOR_NOTIFY, BasicOIDTreeNode.ACCESS_READ_ONLY, BasicOIDTreeNode.ACCESS_READ_WRITE, BasicOIDTreeNode.ACCESS_READ_CREATE}


setAccess

public void setAccess(String access)
Sets the access code

Parameters:
access - access string, such as "read-write"

getRowStatusOID

public SnmpOID getRowStatusOID()
Returns the RowStatus column's SnmpOID. It's a property of table node.


setRowStatusOID

public void setRowStatusOID(SnmpOID rowStatusOID)
Sets the RowStatus column's SnmpOID. It's a property of table node.


isEntryStatus

public boolean isEntryStatus()
Returns true is this table contains RMON EntryStatus row


setEntryStatus

public void setEntryStatus(boolean isEntryStatus)
Sets if this table contains RMON EntryStatus row or not


isRegistered

public boolean isRegistered()
Tests if the MIB table or group is registered or not

Overrides:
isRegistered in class BasicOIDTreeNode

setRegistered

public void setRegistered(boolean isRegistered)
Sets the MIB table or group to be registered or not

Overrides:
setRegistered in class BasicOIDTreeNode

addChild

public CTreeNode addChild(CTreeNode newChild)
Adds passed child node to the appropriate position, child nodes are ordered.


removeChild

public boolean removeChild(CTreeNode oldChild)
Removes the immediate child node indicated by oldChild from the list of children

Overrides:
removeChild in class CTreeNode
Returns:
true if oldChild node is successfully removed.
See Also:
CTreeNode.removeNode(CTreeNode node)

setPartialName

public void setPartialName(boolean b)
Overrides:
setPartialName in class BasicOIDTreeNode

isPartialName

public boolean isPartialName()
Overrides:
isPartialName in class BasicOIDTreeNode

isTreeChanged

public boolean isTreeChanged()

setTreeChanged

public void setTreeChanged(boolean b)

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.