Class DisplayString<V extends org.snmp4j.smi.OctetString>

All Implemented Interfaces:
Comparable

public class DisplayString<V extends org.snmp4j.smi.OctetString> extends MOMutableColumn<V>
The DisplayString class implements the DisplayString textual convention as defined by the SNMPv2-TC MIB specification for columnar objects.
Version:
1.0
Author:
Frank Fock
  • Field Details

  • Constructor Details

    • DisplayString

      public DisplayString(int columnID, MOAccess access, V defaultValue, boolean mutableInService)
    • DisplayString

      public DisplayString(int columnID, MOAccess access, V defaultValue)
    • DisplayString

      public DisplayString(int columnID, MOAccess access, V defaultValue, boolean mutableInService, int minSize, int maxSize)
  • Method Details

    • validate

      public int validate(V newValue, V oldValue)
    • validateDisplayString

      public static int validateDisplayString(org.snmp4j.smi.Variable displayString, ValueConstraint sizeConstraints)
      Validates a variable as a DisplayString OCTET STRING. If the variable is not an OctetString instance, wrongType is returned as error status. Otherwise wrongValue is returned if the string contains non-printable characters other than 'return' and 'new-line'.
      Parameters:
      displayString - a variable to validate.
      sizeConstraints - a constraint for the size (length) of the string.
      Returns:
      a SNMP error status if the variable is not a valid DisplayString or zero if it is.