public class EnumeratedScalar<V extends org.snmp4j.smi.Variable> extends MOScalar<V>
EnumeratedScalar
class represents enumerated SMI INTEGER
(=Integer32
) or an OCTET STRING with enumerated named bits for
scalar objects. The latter represents the SMI construct BITS.Constructor and Description |
---|
EnumeratedScalar(org.snmp4j.smi.OID oid,
MOAccess access,
V value)
Creates an enumerated Integer32 or BITS (OctetString) scalar with
specifying a set of possible values.
|
EnumeratedScalar(org.snmp4j.smi.OID oid,
MOAccess access,
V value,
int[] allowedValues)
Creates an enumerated scalar with specifying a set of possible
values.
|
Modifier and Type | Method and Description |
---|---|
int |
isValueOK(SubRequest request)
Checks whether the new value contained in the supplied sub-request is a
valid value for this object.
|
protected void |
setConstraint(EnumerationConstraint constraint) |
addMOChangeListener, addMOValueValidationListener, changeValue, checkRequestScope, cleanup, commit, covers, find, fireAfterMOChange, fireAfterPrepareMOChange, fireBeforeMOChange, fireBeforePrepareMOChange, fireValidate, get, getAccess, getID, getLowerBound, getOid, getScope, getSingleInstanceScope, getUpperBound, getValue, getValue, isCovered, isLowerIncluded, isOverlapping, isUpperIncluded, isVolatile, load, next, prepare, removeMOChangeListener, removeMOValueValidationListener, save, setValue, setValue, setVolatile, toString, toStringDetails, undo
public EnumeratedScalar(org.snmp4j.smi.OID oid, MOAccess access, V value)
EnumerationConstraint
with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint)
or use an
appropriate value validation listener.oid
- the instance oid (with ".0" suffix) of the scalar.access
- the maximum access for this column.value
- the initial value.public EnumeratedScalar(org.snmp4j.smi.OID oid, MOAccess access, V value, int[] allowedValues)
oid
- the instance oid (with ".0" suffix) of the scalar.access
- the maximum access for this column.value
- the initial value.allowedValues
- an array of possible values for this object.public int isValueOK(SubRequest request)
MOScalar
MOValueValidationEvent
the registered listeners.protected void setConstraint(EnumerationConstraint constraint)
Copyright © 2019 SNMP4J.org. All rights reserved.