Module org.snmp4j

Class SubIndexInfoImpl

java.lang.Object
org.snmp4j.smi.SubIndexInfoImpl
All Implemented Interfaces:
SubIndexInfo

public class SubIndexInfoImpl extends Object implements SubIndexInfo
The SubIndexInfoImpl class represents the meta information of a SMI INDEX clause element (= sub-index) which are relevant for converting an OID index value to an INDEX object and vice versa.
Since:
2.5.0
Author:
Frank Fock
  • Constructor Summary

    Constructors
    Constructor
    Description
    SubIndexInfoImpl(boolean impliedLength, int minLength, int maxLength, int snmpSyntax)
    Create a sub index information object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the maximum length in bytes of the sub-index.
    int
    Gets the minimum length in bytes of the sub-index.
    int
    Gets the SNMP syntax value of the sub-index' base syntax.
    boolean
    Checks if the sub-index represented by this index info has an implied length or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SubIndexInfoImpl

      public SubIndexInfoImpl(boolean impliedLength, int minLength, int maxLength, int snmpSyntax)
      Create a sub index information object.
      Parameters:
      impliedLength - indicates if the sub-index value has an implied variable length (must apply to the last variable length sub-index only).
      minLength - the minimum length in bytes of the sub-index value.
      maxLength - the maximum length in bytes of the sub-index value.
      snmpSyntax - the BER syntax of the sub-index object type's base syntax.
  • Method Details

    • hasImpliedLength

      public boolean hasImpliedLength()
      Description copied from interface: SubIndexInfo
      Checks if the sub-index represented by this index info has an implied length or not.
      Specified by:
      hasImpliedLength in interface SubIndexInfo
      Returns:
      true if the length of this variable length sub-index is implied (i.e., the sub-index is the last in the index).
    • getMinLength

      public int getMinLength()
      Description copied from interface: SubIndexInfo
      Gets the minimum length in bytes of the sub-index. If min and max length are equal, then this sub-index is a fixed length length sub-index.
      Specified by:
      getMinLength in interface SubIndexInfo
      Returns:
      the minimum length of the (sub-index) in bytes.
    • getMaxLength

      public int getMaxLength()
      Description copied from interface: SubIndexInfo
      Gets the maximum length in bytes of the sub-index. If min and max length are equal, then this sub-index is a fixed length length sub-index.
      Specified by:
      getMaxLength in interface SubIndexInfo
      Returns:
      the maximum length of the (sub-index) in bytes.
    • getSnmpSyntax

      public int getSnmpSyntax()
      Description copied from interface: SubIndexInfo
      Gets the SNMP syntax value of the sub-index' base syntax.
      Specified by:
      getSnmpSyntax in interface SubIndexInfo
      Returns:
      the SNMP4J (BER) syntax identifier.