Class AgentXRegion

java.lang.Object
org.snmp4j.agent.DefaultMOScope
org.snmp4j.agent.agentx.AgentXRegion
All Implemented Interfaces:
Serializable, Comparable<AgentXRegion>, org.snmp4j.agent.MOScope, org.snmp4j.agent.MutableMOScope

public class AgentXRegion extends org.snmp4j.agent.DefaultMOScope implements Comparable<AgentXRegion>, Serializable
The AgentXRegion represents a MIB region which can be an entire MIB or a single object-instance.
See Also:
  • Field Summary

    Fields inherited from class org.snmp4j.agent.DefaultMOScope

    lowerBound, lowerIncluded, upperBound, upperIncluded
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a copy of an AgentXRegion.
    AgentXRegion(org.snmp4j.smi.OID lowerBound, org.snmp4j.smi.OID upperBound)
    Creates a new AgentXRegion from lower and upper bound.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
    Gets the lower bound sub-ID of a range.
    byte
    Gets the range sub-id (i.e.
    int
    Gets the upper bound of the region.
    boolean
    Checks if there is at least a single OID contained in this MIB region.
    boolean
    Checks if this region is a object instance range.
    boolean
    Checks if the MIB region represents a single object-instance.
    void
    setRangeSubID(byte rangeSubID)
    Sets the range sub-id (i.e.
    void
    setSingleOID(boolean singleOID)
    Indicates if the MIB region represents a single object-instance.
     

    Methods inherited from class org.snmp4j.agent.DefaultMOScope

    covers, covers, covers, equals, getLowerBound, getUpperBound, hashCode, isCovered, isLowerIncluded, isOverlapping, isUpperIncluded, overlaps, setLowerBound, setLowerIncluded, setUpperBound, setUpperIncluded, subtractScope

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AgentXRegion

      public AgentXRegion(org.snmp4j.smi.OID lowerBound, org.snmp4j.smi.OID upperBound)
      Creates a new AgentXRegion from lower and upper bound.
      Parameters:
      lowerBound - the lower bound of the region (including).
      upperBound - the upper bound of the region (excluding).
    • AgentXRegion

      public AgentXRegion(AgentXRegion other)
      Creates a copy of an AgentXRegion.
      Parameters:
      other - the original region.
  • Method Details

    • getRangeSubID

      public byte getRangeSubID()
      Gets the range sub-id (i.e. the "wildcard" sub-identifier index).
      Returns:
      the range sub ID index.
    • isSingleOID

      public boolean isSingleOID()
      Checks if the MIB region represents a single object-instance.
      Returns:
      true if this region represents a single object-instance.
    • setRangeSubID

      public void setRangeSubID(byte rangeSubID)
      Sets the range sub-id (i.e. the "wildcard" sub-identifier index).
      Parameters:
      rangeSubID - the range sub ID index.
    • setSingleOID

      public void setSingleOID(boolean singleOID)
      Indicates if the MIB region represents a single object-instance.
      Parameters:
      singleOID - true if this region represents a single object-instance.
    • getUpperBoundSubID

      public int getUpperBoundSubID()
      Gets the upper bound of the region.
      Returns:
      0 if this is not a range region, and the upper bound range-sub-identifier otherwise.
    • isRange

      public boolean isRange()
      Checks if this region is a object instance range.
      Returns:
      true if getRangeSubID() is greater than zero.
    • isEmpty

      public boolean isEmpty()
      Checks if there is at least a single OID contained in this MIB region.
      Overrides:
      isEmpty in class org.snmp4j.agent.DefaultMOScope
      Returns:
      true if upper bound is greater or equals lower bound.
    • getLowerBoundSubID

      public int getLowerBoundSubID()
      Gets the lower bound sub-ID of a range.
      Returns:
      0 if this is not a range region, and the lower bound range-sub-identifier otherwise.
    • compareTo

      public int compareTo(AgentXRegion other)
      Specified by:
      compareTo in interface Comparable<AgentXRegion>
    • toString

      public String toString()
      Overrides:
      toString in class org.snmp4j.agent.DefaultMOScope