|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ireasoning.util.CTreeNode com.ireasoning.util.MibTreeNode
This class represents node in a MIB tree
Field Summary | |
static byte |
SYN_BITS
Bits data type |
static byte |
SYN_COUNTER
Counter32 data type |
static byte |
SYN_COUNTER64
Counter64 data type |
static byte |
SYN_GAUGE
Gauge data type |
static byte |
SYN_INTEGER
Integer data type |
static byte |
SYN_IPADDRESS
IpAddress data type |
static byte |
SYN_OID
OID data type |
static byte |
SYN_OPAQUE
Opaque data type |
static byte |
SYN_STRING
Octet String data type |
static byte |
SYN_TIMETICKS
Timeticks data type |
static byte |
SYN_UNSIGNED
Unsigned integer data type |
Constructor Summary | |
MibTreeNode(Comparable name)
Constructor |
|
MibTreeNode(Comparable name,
CTreeNode root)
Constructor |
Method Summary | |
MibTreeNode |
findChildNode(SnmpOID childOid)
Finds immediate child node whose oid match passed childOid. |
MibTreeNode |
findChildNode(String childOid)
Finds immediate child node whose oid match passed childOid. |
String |
getAccess()
ACCESS or MAX-ACCESS clause. |
String |
getAugments()
Returns the AUGMENTS clause |
String |
getAugmentsTable()
Returns the agumenting table from a table node |
String |
getDefVal()
Returns the value of "DEFVAL" clause |
String |
getDescription()
Returns the MIB node's Description clause |
String |
getFullName()
Gets the oid as fully qualified name, such as ".iso.org.dod.internet.mgmt.mib-2.ip.ipAddrTable" |
String[] |
getIndice()
Return indices from table entry node |
String |
getModuleIdentity()
Returns the MIB's MODULE-IDENTITY value |
String |
getModuleName()
Returns MIB module name |
byte |
getNodeType()
|
String[] |
getObjects()
Returns OBJECTS clause as string array |
String[] |
getObjectsOIDs()
Returns the OIDs corresponding to each object in OBJECTS clause |
SnmpOID |
getOID()
Returns OID of this node |
byte |
getRealSyntaxType()
Returns the node's basic syntax type. |
SnmpOID |
getRowStatusOID()
The OID of the table entry which is RowStatus or EntryStatus type. |
String |
getStatus()
Returns the STATUS clause value |
Syntax |
getSyntax()
Returns the syntax clause as a Syntax object. |
String |
getSyntaxType()
Returns the Syntax clause' data type. |
String[] |
getTableIndice()
Returns indice from table node |
Vector |
getTrapNodes()
Returns the SMIv1/v2 trap nodes |
String |
getUnits()
Returns the value of "UNITS" clause |
boolean |
isDynamicTable()
Tests if it's a dynamic table. |
boolean |
isEntryStatus()
Tests if it's SNMPv1 dynamic table It's a property of table node. |
boolean |
isGroupNode()
Returns true if this node is a group node, such as "system" group |
boolean |
isImplied()
Tests if it's a IMPLIED index node. |
boolean |
isIndexNode()
Test if it's a index node, e.g. |
boolean |
isScalarNode()
Tests if it's a scalar node, e.g. |
boolean |
isSnmpV2TrapNode()
Tests if it's a SMIv2 trap node |
boolean |
isTableColumnNode()
Checks if it's a column node in a table, such as IfIndex in IfTable. |
boolean |
isTableEntryNode()
Returns true if this node is table entry node, such as "ifEntry" node |
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" node |
static void |
normalizeTreeNodeNames(MibTreeNode start)
Changes all the node names starting from start node to be compatible with java naming convention (such as no '-' or '.' is allowed), and ensure there is no duplicate names. |
MibTreeNode |
searchByOID(SnmpOID oid)
Search for the node whose OID is the passed oid , whithin this node's subtree |
MibTreeNode |
searchIgnoreCase(String name)
Case insensitive search for the node with passed name within this node's subtree, starting from itself. |
MibTreeNode |
searchIgnoreCase(String name,
String parentNodeName)
Case insensitive search for the node with passed name within this node's subtree, starting from itself. |
void |
setAccess(String access)
Sets the MIB node's ACCESS or MAX-ACCESS clause value |
void |
setAugments(String augments)
Sets the AUGMENTS clause |
void |
setAugmentsTable(String augments)
|
void |
setDefVal(String defval)
Sets the value of "DEFVAL" clause |
void |
setDescription(String s)
Sets the value of Description clause |
void |
setEntryStatus(boolean isEntryStatus)
|
void |
setFullName(String s)
Sets full name of this node |
void |
setImplied(boolean isImplied)
|
void |
setIndice(String[] s)
Sets indice of this node ( Table's entry node) |
void |
setModuleName(String name)
|
void |
setObjects(String[] s)
Sets the value of OBJECTS clause |
void |
setObjectsOIDs(String[] s)
Sets OIDs for each object in OBJECTS clause |
void |
setOID(SnmpOID oid)
Sets numeric OID value |
void |
setOID(String oid)
Sets numeric OID value |
void |
setRealSyntaxType(byte type)
Sets the basic syntax type of this node |
void |
setRowStatusOID(SnmpOID rowStatusOID)
The OID of the table entry which is RowStatus or EntryStatus type. |
void |
setStatus(String status)
Sets the STATUS clause value |
void |
setSyntax(Syntax s)
Sets Syntax object |
void |
setTableIndice(String[] s)
|
void |
setTableNode(boolean b)
Sets whether this node is a table node |
void |
setUnits(String units)
Sets the value of "UNITS" clause |
static void |
shallowCopy(MibTreeNode src,
MibTreeNode dest)
Makes a copy of this node, its child nodes are not copied |
static SnmpDataType |
toSnmpObject(byte dataType,
String value)
Returns java object corresponding to the passed data type |
String |
toString()
Returns a string representation Methods used in this method: getName, getOID, getFullName, getSyntax, getAccess, getStatus, isIndexNode, isSnmpV2TrapNode, getIndice, getAugments, getDescription, etc. |
Methods inherited from class com.ireasoning.util.CTreeNode |
addChild, addChild, appendChild, appendChild, appendChild, compareTo, compareTo, compareTo, copy, equals, getChildNode, getChildNodeCount, getChildNodeIndex, getChildNodes, getFirstChild, getLastChild, getLeftMost, getName, getNextSibling, getParent, getPrevSibling, getRawName, getRightMost, getRoot, hashCode, insertBefore, isChildNode, isInSameTree, isLeaf, isRoot, removeChild, removeChild, removeChild, removeNode, replaceChild, search, setName, setParent, setRoot, toJTreeNode, traverse |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte SYN_OID
public static final byte SYN_STRING
public static final byte SYN_INTEGER
public static final byte SYN_UNSIGNED
public static final byte SYN_GAUGE
public static final byte SYN_COUNTER
public static final byte SYN_COUNTER64
public static final byte SYN_TIMETICKS
public static final byte SYN_IPADDRESS
public static final byte SYN_BITS
public static final byte SYN_OPAQUE
Constructor Detail |
public MibTreeNode(Comparable name)
name
- mib node namepublic MibTreeNode(Comparable name, CTreeNode root)
root
- root of this treename
- mib node nameMethod Detail |
public byte getNodeType()
public SnmpOID getOID()
public void setOID(String oid)
public void setOID(SnmpOID oid)
public String getFullName()
CTreeNode.getName()
public void setFullName(String s)
public String getDescription()
public void setDescription(String s)
public String getAccess()
public void setAccess(String access)
public String getDefVal()
public void setDefVal(String defval)
public String getUnits()
public void setUnits(String units)
public String getStatus()
public void setStatus(String status)
public boolean isTableNode()
public void setTableNode(boolean b)
public boolean isTableEntryNode()
public boolean isGroupNode()
public boolean isTableColumnNode()
public boolean isTableLeafNode()
public boolean isIndexNode()
public boolean isScalarNode()
public Syntax getSyntax()
public void setSyntax(Syntax s)
public String getSyntaxType()
getSyntax()
public byte getRealSyntaxType()
Note:
You need to call MibUtil.setRealSyntaxType(true)
before calling MibUtil.parserMib(...) method.
MibUtil.setResolveSyntax(boolean b)
public void setRealSyntaxType(byte type)
public String[] getIndice()
public void setIndice(String[] s)
public String[] getTableIndice()
public void setTableIndice(String[] s)
public String[] getObjects()
public void setObjects(String[] s)
public String[] getObjectsOIDs()
getObjects()
public void setObjectsOIDs(String[] s)
public static void shallowCopy(MibTreeNode src, MibTreeNode dest)
public static void normalizeTreeNodeNames(MibTreeNode start)
public MibTreeNode findChildNode(String childOid)
childOid
- the oid of child node, which might be appended with indice, so it
might be longer
searchIgnoreCase(java.lang.String)
public MibTreeNode findChildNode(SnmpOID childOid)
childOid
- the oid of child node, which might be appended with indice, so it
might be longer
searchIgnoreCase(java.lang.String)
public static SnmpDataType toSnmpObject(byte dataType, String value)
dataType
- one of {SYN_OID, SYN_STRING, SYN_INTEGER, SYN_UNSIGNED, SYN_GAUGE, SYN_COUNTER, SYN_COUNTER64, SYN_TIMETICKS, SYN_IPADDRESS, SYN_BITS, SYN_OPAQUE}value
- a String value
public SnmpOID getRowStatusOID()
public void setRowStatusOID(SnmpOID rowStatusOID)
public boolean isDynamicTable()
public boolean isEntryStatus()
public void setEntryStatus(boolean isEntryStatus)
public String getAugments()
public void setAugments(String augments)
public String getAugmentsTable()
public void setAugmentsTable(String augments)
public boolean isImplied()
public void setImplied(boolean isImplied)
public Vector getTrapNodes()
TrapNode
public boolean isSnmpV2TrapNode()
public MibTreeNode searchByOID(SnmpOID oid)
oid
, whithin this node's subtree
oid
- the OID of the node to be found
searchIgnoreCase(java.lang.String)
public MibTreeNode searchIgnoreCase(String name)
name
- mib node name (NOT oid)
CTreeNode.search(java.lang.Comparable)
,
searchByOID(com.ireasoning.protocol.snmp.SnmpOID)
public MibTreeNode searchIgnoreCase(String name, String parentNodeName)
This method is especially useful if MIBs contain duplicate node names. The searchIgnoreCase(String name)
cannot uniquely identify nodes with duplicate names. In this case this method can help you find the nodes.
name
- mib node name (NOT oid)parentNodeName
- parent node name
CTreeNode.search(java.lang.Comparable)
,
searchByOID(com.ireasoning.protocol.snmp.SnmpOID)
,
searchIgnoreCase(String name)
public String getModuleName()
public void setModuleName(String name)
public String getModuleIdentity()
public String toString()
toString
in class CTreeNode
CTreeNode.getName()
,
getOID()
,
getFullName()
,
getSyntax()
,
getAccess()
,
getStatus()
,
isIndexNode()
,
isSnmpV2TrapNode()
,
getIndice()
,
getAugments()
,
getDescription()
|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |