org.netxms.client.snmp
Class MibTree

java.lang.Object
  extended by org.netxms.client.snmp.MibTree

public class MibTree
extends java.lang.Object

This class represents MIB tree.


Field Summary
protected static int SMT_COMPRESS_DATA
           
protected static int SMT_SKIP_DESCRIPTIONS
           
 
Constructor Summary
MibTree()
          Create empty MIB tree
MibTree(java.io.File file)
          Create MIB tree from compiled MIB file.
 
Method Summary
 MibObject findObject(SnmpObjectId oid, boolean exactMatch)
          Find matching object in tree.
 MibObject getRootObject()
          Get root object for MIB tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMT_COMPRESS_DATA

protected static final int SMT_COMPRESS_DATA
See Also:
Constant Field Values

SMT_SKIP_DESCRIPTIONS

protected static final int SMT_SKIP_DESCRIPTIONS
See Also:
Constant Field Values
Constructor Detail

MibTree

public MibTree()
Create empty MIB tree


MibTree

public MibTree(java.io.File file)
        throws java.io.IOException,
               NXCException
Create MIB tree from compiled MIB file.

Parameters:
file - compiled MIB file
Throws:
java.io.IOException - if I/O error occurs
NXCException - if MIB file format errors detected
Method Detail

getRootObject

public MibObject getRootObject()
Get root object for MIB tree

Returns:
the root object

findObject

public MibObject findObject(SnmpObjectId oid,
                            boolean exactMatch)
Find matching object in tree. If exactMatch set to true, method will search for object with ID equal to given. If exactMatch set to false, and object with given id cannot be found, closest upper level object will be returned (i.e., if object .1.3.6.1.5 does not exist in the tree, but .1.3.6.1 does, .1.3.6.1 will be returned in search for .1.3.6.1.5).

Parameters:
oid - object id to find
exactMatch - set to true if exact match required
Returns:
MIB object or null if matching object not found


Copyright © 2013. All Rights Reserved.