Package org.snmp4j.model.snmp.proxy.impl
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
The SnmpColumn class represents a columnar MIB object.
- Author:
- Frank Fock
-
Constructor Summary
ConstructorsConstructorDescriptionSnmpColumn
(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 TypeMethodDescriptionGets 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
getOID()
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
Sets the column header.toString()
-
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 benew 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 benew 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 benew 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 interfaceSnmpProxyColumn<T>
- Returns:
- a column OID.
-
getValueClass
Description copied from interface:SnmpProxyColumn
Gets the class of the model value type.- Specified by:
getValueClass
in interfaceSnmpProxyColumn<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 interfaceSnmpProxyColumn<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 interfaceSnmpProxyColumn<T>
- Returns:
- the maximum character width.
-
setHeader
Sets the column header.- Parameters:
header
- the header string for this column.
-
getHeader
Description copied from interface:SnmpProxyColumn
Gets the header string for the column.- Specified by:
getHeader
in interfaceSnmpProxyColumn<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 interfaceSnmpProxyColumn<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 interfaceSnmpProxyColumn<T>
- Returns:
- the SmiSyntax that represents the base MIB syntax of this column.
-
toString
-