Class MibObject

java.lang.Object
org.netxms.client.snmp.MibObject

public class MibObject extends Object
This class represents single MIB tree object.
  • Field Details

  • Constructor Details

    • MibObject

      public MibObject()
      Default constructor - create empty "[root]" object.
    • MibObject

      protected MibObject(NXCPDataInputStream in, MibObject parent) throws IOException, NXCException
      Read MIB object from compiled MIB file.
      Parameters:
      in - Input stream attached to MIB file
      parent - parent MIB object
      Throws:
      IOException - if MIB file cannot be read
      NXCException - f MIB file cannot be parsed
  • Method Details

    • getId

      public long getId()
      Returns:
      the id
    • getName

      public String getName()
      Returns:
      the name
    • getFullName

      public String getFullName()
      Get object's full name (including all parents)
      Returns:
      object's full name (including all parents)
    • getDescription

      public String getDescription()
      Returns:
      the description
    • getIndex

      public String getIndex()
      Returns:
      the index
    • getType

      public int getType()
      Returns:
      the type
    • getStatus

      public int getStatus()
      Returns:
      the status
    • getAccess

      public int getAccess()
      Returns:
      the access
    • getChildObjects

      public MibObject[] getChildObjects()
      Get all child objects
      Returns:
      Array of child objects
    • getParent

      public MibObject getParent()
      Returns:
      the parent
    • getObjectId

      public SnmpObjectId getObjectId()
      Returns:
      the objectId
    • hasChildren

      public boolean hasChildren()
      Check if object has child objects.
      Returns:
      true if object has child objects
    • findChildObject

      protected MibObject findChildObject(SnmpObjectId oid)
      Find child object with given ID
      Parameters:
      oid - SNMP object ID
      Returns:
      MIB object with given OID or null
    • getTextualConvention

      public final String getTextualConvention()
      Returns:
      the textualConvention
    • getDisplayHint

      public String getDisplayHint()
      Returns:
      the displayHint
    • getEnumValues

      public String getEnumValues()
      Returns:
      the enumValues
    • resolveEnumValue

      public String resolveEnumValue(int value)
      Resolve numeric value to its MIB enum label (e.g. 1 -> "up"). Parses enumValues string in format "name1(N1), name2(N2), ..." on first call and caches the result. Returns null if this object has no enum values or the given numeric value is not present in the enumeration.
      Parameters:
      value - numeric value to resolve
      Returns:
      enum label, or null if not found