Interface SmiObject

All Known Subinterfaces:
SmiModule, SmiModuleCompliance, SmiModuleIdentity, SmiNotificationType, SmiObjectType, SmiObjectTypeIndex, SmiTextualConvention

public interface SmiObject
The SmiObject interface represents the SMI information of a MIB object.
Author:
Frank Fock
  • Method Details

    • getObjectName

      String getObjectName()
      Gets the OBJECT-NAME of the SMI object.
      Returns:
      an object-name.
    • getOID

      org.snmp4j.smi.OID getOID()
      Gets the object-identifier of the SMI object (if present).
      Returns:
      an OID or null for object-names or textual-conventions.
    • getSmiSyntax

      int getSmiSyntax()
      Gets the SMI syntax as defined by SMIConstants for this OBJECT-TYPE. If this SmiObject is not of type SmiType.OBJECT_TYPE_SCALAR, SmiType.OBJECT_TYPE_COLUMN and not of type SmiType.TEXTUAL_CONVENTION then zero is returned.
      Returns:
      the SMI BER syntax identifier or 0 if this object has no syntax.
    • getDescription

      String getDescription()
      Gets the description text of the SMI object.
      Returns:
      the description without the enclosing double quotes.
    • getType

      SmiType getType()
      Gets the SMI type of the SMI object. The OBJECT-TYPE construct is used for scalar, tabular, row (entry), and columnar objects in SMI. SNMP4J-SMI-PRO distinguishes between these types.
      Returns:
      the SMI type of this SMI object.
    • getChildren

      List<? extends SmiObject> getChildren()
      Gets all child objects below this SMI object. A child object is found if the following statements are all true:
      • it has an OID that starts with its parent's OID and is at least one sub-identifier longer
      • there is no object with a shorter OID that is also child of its parent (regarding the first rule)
      Note: For SmiTextualConvention instances, this method always returns null.
      Returns:
      the child objects of this SMI object.
    • getParent

      SmiObject getParent()
      Gets the parent object for this SMI object. A parent object is found if the following statements are all true:
      • it has an OID that is the prefix of its child's OID and is at least one sub-identifier shorter
      • there is no object with a longer OID that is also parent of the child (regarding the first rule)
      Note: For SmiTextualConvention instances, this method always returns null.
      Returns:
      the parent object of this SMI object.
    • getReference

      String getReference()
      Gets the REFERENCE clause content of the SMI object.
      Returns:
      an ASCII string.
    • getStatus

      SmiStatus getStatus()
      Gets the STATUS clause content of the SMI object.
      Returns:
      a SmiStatus instance.
    • getAsn1Comments

      String[] getAsn1Comments()
      Gets the ASN.1 comments associated with this SMI object. The length of the array is always fixed per API version. If a comment is not available, single or all array elements might be null.
      Returns:
      an array of ASN.1 comments. The array is never null but elements could be null.