public class Enumerated<V extends org.snmp4j.smi.Variable> extends MOMutableColumn<V>
Enumerated
class represents enumerated SMI INTEGER
(=Integer32
) or an OCTET STRING with enumerated named bits for
columnar objects. The latter represents the SMI construct BITS.Constructor and Description |
---|
Enumerated(int columnID,
int smiSyntax,
MOAccess access,
V defaultValue)
Creates an enumerated INTEGER column.
|
Enumerated(int columnID,
int smiSyntax,
MOAccess access,
V defaultValue,
boolean mutableInService)
Creates an enumerated INTEGER or BITS column.
|
Enumerated(int columnID,
int smiSyntax,
MOAccess access,
V defaultValue,
boolean mutableInService,
int[] allowedValues)
Creates an enumerated INTEGER or BITS column with specifying a set of possible
values.
|
Enumerated(int columnID,
MOAccess access,
V defaultValue)
Deprecated.
As this version of the constructor does not safely define the column syntax if the defaultValue is null,
use
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable) instead. |
Enumerated(int columnID,
MOAccess access,
V defaultValue,
boolean mutableInService)
Deprecated.
As this version of the constructor does not safely define the column syntax if the defaultValue is null,
use
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable, boolean) instead. |
Enumerated(int columnID,
MOAccess access,
V defaultValue,
boolean mutableInService,
int[] allowedValues)
Deprecated.
As this version of the constructor does not safely define the column syntax if the defaultValue is null,
use
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable, boolean, int[]) instead. |
Modifier and Type | Method and Description |
---|---|
protected void |
setConstraint(EnumerationConstraint constraint) |
int |
validate(org.snmp4j.smi.Variable newValue,
org.snmp4j.smi.Variable oldValue) |
addMOValueValidationListener, cleanup, commit, getDefaultValue, isMandatory, isMutableInService, prepare, removeMOValueValidationListener, setDefaultValue, setMandatory, setMutableInService, toString, undo, validateSetRequest
compareTo, get, getAccess, getColumnID, getRestoreValue, getStoreValue, getSyntax, getTable, getValue, isVolatile, setAccess, setColumnID, setSyntax, setTable
public Enumerated(int columnID, MOAccess access, V defaultValue, boolean mutableInService, int[] allowedValues)
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable, boolean, int[])
instead.columnID
- the column ID (sub-identifier) of the column.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.mutableInService
- specifies whether this column can be changed while in service (active).allowedValues
- an array of possible values for this object.public Enumerated(int columnID, MOAccess access, V defaultValue, boolean mutableInService)
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable, boolean)
instead.EnumerationConstraint
with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint)
or use an
appropriate value validation listener.columnID
- the column ID (sub-identifier) of the column.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.mutableInService
- specifies whether this column can be changed while in service (active).public Enumerated(int columnID, MOAccess access, V defaultValue)
Enumerated(int, int, org.snmp4j.agent.MOAccess, org.snmp4j.smi.Variable)
instead.EnumerationConstraint
with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint)
or use an
appropriate value validation listener.columnID
- the column ID (sub-identifier) of the column.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.public Enumerated(int columnID, int smiSyntax, MOAccess access, V defaultValue, boolean mutableInService, int[] allowedValues)
columnID
- the column ID (sub-identifier) of the column.smiSyntax
- the smiSyntax for this column, which can be SMIConstants.SYNTAX_INTEGER32
or
SMIConstants.SYNTAX_OCTET_STRING
.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.mutableInService
- specifies whether this column can be changed while in service (active).allowedValues
- an array of possible values for this object.public Enumerated(int columnID, int smiSyntax, MOAccess access, V defaultValue, boolean mutableInService)
EnumerationConstraint
with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint)
or use an
appropriate value validation listener.columnID
- the column ID (sub-identifier) of the column.smiSyntax
- the smiSyntax for this column, which can be SMIConstants.SYNTAX_INTEGER32
or
SMIConstants.SYNTAX_OCTET_STRING
.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.mutableInService
- specifies whether this column can be changed while in service (active).public Enumerated(int columnID, int smiSyntax, MOAccess access, V defaultValue)
EnumerationConstraint
with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint)
or use an
appropriate value validation listener.columnID
- the column ID (sub-identifier) of the column.smiSyntax
- the smiSyntax for this column, which can be SMIConstants.SYNTAX_INTEGER32
or
SMIConstants.SYNTAX_OCTET_STRING
.access
- the maximum access for this column.defaultValue
- the default value used for new rows (must not be null
for INTEGER enumerations). This value
also defines the syntax of the column.public int validate(org.snmp4j.smi.Variable newValue, org.snmp4j.smi.Variable oldValue)
validate
in class MOMutableColumn<V extends org.snmp4j.smi.Variable>
protected void setConstraint(EnumerationConstraint constraint)
Copyright © 2020 SNMP4J.org. All rights reserved.