Class SnmpColumn<T>

java.lang.Object
org.snmp4j.model.snmp.proxy.impl.SnmpColumn<T>
Type Parameters:
T - specifies the value type of the column.
All Implemented Interfaces:
SnmpProxyColumn<T>
Direct Known Subclasses:
SnmpIndexColumn

public class SnmpColumn<T> extends Object implements SnmpProxyColumn<T>
The SnmpColumn class represents a columnar MIB object.
Author:
Frank Fock
  • Constructor Summary

    Constructors
    Constructor
    Description
    SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax)
    Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
    SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax, int minWidth, int maxWidth)
    Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
    SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax, int minWidth, int maxWidth, String header)
    Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the header string for the column.
    int
    Gets the maximum width of the column's values in characters.
    int
    Gets the minimum width of the column's values in characters.
    org.snmp4j.smi.OID
    Gets the instance OID of the SNMP columnar object associated with this proxy column.
    org.snmp4j.smi.MaxAccess
    Gets the SMI maximum access for this column.
    int
    Gets the SMI syntax for this column.
    Gets the class of the model value type.
    void
    setHeader(String header)
    Sets the column header.
     

    Methods inherited from class java.lang.Object

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

    • SnmpColumn

      public SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax)
      Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
      Parameters:
      oid - the object identifier of the columnar MIB object. For example, for the column ifDescr this would be new OID(1.3.6.1.2.1.2.2.1.2).
      valueClass - the class of the value representation for this column within the model.
      smiMaxAccess - the maximum access that should be supported by the model for this column (the access right should be less or equal to the maximum access right defined by the corresponding MIB).
      smiSyntax - the SMI syntax of the object.
    • SnmpColumn

      public SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax, int minWidth, int maxWidth)
      Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
      Parameters:
      oid - the object identifier of the columnar MIB object. For example, for the column ifDescr this would be new OID(1.3.6.1.2.1.2.2.1.2).
      valueClass - the class of the value representation for this column within the model.
      smiMaxAccess - the maximum access that should be supported by the model for this column (the access right should be less or equal to the maximum access right defined by the corresponding MIB).
      smiSyntax - the SMI syntax of the object.
      minWidth - the minimum width in characters of the values for this column. This servers as a hint for the column size calculation when this model is being rendered for display.
      maxWidth - the maximum width in characters of the values of this column. This servers as a hint for the column size calculation when this model is being rendered for display.
    • SnmpColumn

      public SnmpColumn(org.snmp4j.smi.OID oid, Class<T> valueClass, org.snmp4j.smi.MaxAccess smiMaxAccess, int smiSyntax, int minWidth, int maxWidth, String header)
      Create a column with an OID (i.e., the object identifier of the columnar MIB object without any index), value class, maximum supported access and SMI syntax.
      Parameters:
      oid - the object identifier of the columnar MIB object. For example, for the column ifDescr this would be new OID(1.3.6.1.2.1.2.2.1.2).
      valueClass - the class of the value representation for this column within the model.
      smiMaxAccess - the maximum access that should be supported by the model for this column (the access right should be less or equal to the maximum access right defined by the corresponding MIB).
      smiSyntax - the SMI syntax of the object.
      minWidth - the minimum width in characters of the values for this column. This servers as a hint for the column size calculation when this model is being rendered for display.
      maxWidth - the maximum width in characters of the values of this column. This servers as a hint for the column size calculation when this model is being rendered for display.
      header - the header string for this column (this value is not actually used by the proxy but can be used by a column renderer.
  • Method Details

    • getOID

      public org.snmp4j.smi.OID getOID()
      Description copied from interface: SnmpProxyColumn
      Gets the instance OID of the SNMP columnar object associated with this proxy column.
      Specified by:
      getOID in interface SnmpProxyColumn<T>
      Returns:
      a column OID.
    • getValueClass

      public Class<T> getValueClass()
      Description copied from interface: SnmpProxyColumn
      Gets the class of the model value type.
      Specified by:
      getValueClass in interface SnmpProxyColumn<T>
      Returns:
      the class of the model value.
    • getMinWidth

      public int getMinWidth()
      Gets the minimum width of the column's values in characters.
      Specified by:
      getMinWidth in interface SnmpProxyColumn<T>
      Returns:
      the minimum character width.
    • getMaxWidth

      public int getMaxWidth()
      Gets the maximum width of the column's values in characters.
      Specified by:
      getMaxWidth in interface SnmpProxyColumn<T>
      Returns:
      the maximum character width.
    • setHeader

      public void setHeader(String header)
      Sets the column header.
      Parameters:
      header - the header string for this column.
    • getHeader

      public String getHeader()
      Description copied from interface: SnmpProxyColumn
      Gets the header string for the column.
      Specified by:
      getHeader in interface SnmpProxyColumn<T>
      Returns:
      the column header string.
    • getSmiMaxAccess

      public org.snmp4j.smi.MaxAccess getSmiMaxAccess()
      Description copied from interface: SnmpProxyColumn
      Gets the SMI maximum access for this column.
      Specified by:
      getSmiMaxAccess in interface SnmpProxyColumn<T>
      Returns:
      the maximum access as defined by the corresponding MIB.
    • getSmiSyntax

      public int getSmiSyntax()
      Gets the SMI syntax for this column.
      Specified by:
      getSmiSyntax in interface SnmpProxyColumn<T>
      Returns:
      the SmiSyntax that represents the base MIB syntax of this column.
    • toString

      public String toString()
      Overrides:
      toString in class Object