org.snmp4j.agent.mo.snmp
Class Enumerated

java.lang.Object
  extended by org.snmp4j.agent.mo.MOColumn
      extended by org.snmp4j.agent.mo.MOMutableColumn
          extended by org.snmp4j.agent.mo.snmp.Enumerated
All Implemented Interfaces:
java.lang.Comparable

public class Enumerated
extends MOMutableColumn

The 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.

Version:
1.2
Author:
Frank Fock

Constructor Summary
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.Integer32 defaultValue)
          Creates an enumerated INTEGER column.
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.Integer32 defaultValue, boolean mutableInService)
          Creates an enumerated INTEGER column.
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.Integer32 defaultValue, boolean mutableInService, int[] allowedValues)
          Creates an enumerated INTEGER column with specifying a set of possible values.
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.OctetString defaultValue)
          Creates a BITS column.
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.OctetString defaultValue, boolean mutableInService)
          Creates a BITS column.
Enumerated(int columnID, MOAccess access, org.snmp4j.smi.OctetString defaultValue, boolean mutableInService, int[] allowedValues)
          Creates a BITS column with specifying a set of possible bit values.
 
Method Summary
protected  void setConstraint(EnumerationConstraint constraint)
           
 int validate(org.snmp4j.smi.Variable newValue, org.snmp4j.smi.Variable oldValue)
           
 
Methods inherited from class org.snmp4j.agent.mo.MOMutableColumn
addMOValueValidationListener, cleanup, commit, getDefaultValue, isMandatory, isMutableInService, prepare, removeMOValueValidationListener, setDefaultValue, setMandatory, setMutableInService, toString, undo, validateSetRequest
 
Methods inherited from class org.snmp4j.agent.mo.MOColumn
compareTo, get, getAccess, getColumnID, getSyntax, getTable, getValue, isVolatile, setAccess, setColumnID, setSyntax, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.Integer32 defaultValue,
                  boolean mutableInService,
                  int[] allowedValues)
Creates an enumerated INTEGER column with specifying a set of possible values.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.
mutableInService - specifies whether this column can be changed while in service (active).
allowedValues - an array of possible values for this object.

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.Integer32 defaultValue,
                  boolean mutableInService)
Creates an enumerated INTEGER column. To constraint the possible values assignable to this object, you will have to set the corresponding EnumerationConstraint with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint) or use an appropriate value validation listener.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.
mutableInService - specifies whether this column can be changed while in service (active).

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.Integer32 defaultValue)
Creates an enumerated INTEGER column. To constraint the possible values assignable to this object, you will have to set the corresponding EnumerationConstraint with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint) or use an appropriate value validation listener.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.OctetString defaultValue,
                  boolean mutableInService,
                  int[] allowedValues)
Creates a BITS column with specifying a set of possible bit values.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.
mutableInService - specifies whether this column can be changed while in service (active).
allowedValues - an array of possible bit values for this object.
Since:
1.2

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.OctetString defaultValue,
                  boolean mutableInService)
Creates a BITS column. To constraint the possible values assignable to this object, you will have to set the corresponding EnumerationConstraint with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint) or use an appropriate value validation listener.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.
mutableInService - specifies whether this column can be changed while in service (active).
Since:
1.2

Enumerated

public Enumerated(int columnID,
                  MOAccess access,
                  org.snmp4j.smi.OctetString defaultValue)
Creates a BITS column. To constraint the possible values assignable to this object, you will have to set the corresponding EnumerationConstraint with setConstraint(org.snmp4j.agent.mo.snmp.smi.EnumerationConstraint) or use an appropriate value validation listener.

Parameters:
columnID - the column ID (sub-identifier) of the column.
access - the maximum access for this column.
defaultValue - the default value used for new rows.
Method Detail

validate

public int validate(org.snmp4j.smi.Variable newValue,
                    org.snmp4j.smi.Variable oldValue)
Overrides:
validate in class MOMutableColumn

setConstraint

protected void setConstraint(EnumerationConstraint constraint)

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.