Class SnmpValuesChangeSet

java.lang.Object
org.snmp4j.model.snmp.proxy.impl.SnmpValuesChangeSet
All Implemented Interfaces:
ChangeSet<SnmpValueChange>

public class SnmpValuesChangeSet extends Object implements ChangeSet<SnmpValueChange>
The SnmpValuesChangeSet class implements a set of changes that must be applied atomically.
Author:
Frank Fock
  • Constructor Details

    • SnmpValuesChangeSet

      public SnmpValuesChangeSet()
      Creates an empty change set.
    • SnmpValuesChangeSet

      public SnmpValuesChangeSet(Collection<SnmpValueChange> changes, Object userReference)
      Creates a change set based on a provided list of changes and with an associated user object.
      Parameters:
      changes - the changes to include in the change set. The provided collection is not be used internally.
      userReference - a arbitrary user defined object to be associated with this change set.
  • Method Details

    • addChange

      public void addChange(SnmpValueChange change)
      Adds a change to the change set.
      Parameters:
      change - the new change to add.
    • getChanges

      public List<SnmpValueChange> getChanges()
      Description copied from interface: ChangeSet
      Gets a list of the changes objects.
      Specified by:
      getChanges in interface ChangeSet<SnmpValueChange>
      Returns:
      the changes as a new list.
    • getNewValues

      public List getNewValues()
      Gets all the new values as new a list.
      Returns:
      a list of the new values in the change set.
    • isVariableSetOk

      public boolean isVariableSetOk()
      Checks if all variables are not null.
      Returns:
      true if all SNMP variables are set (not null).
    • getVariableBindings

      public List<? extends org.snmp4j.smi.VariableBinding> getVariableBindings()
      Gets the variable bindings that are formed by this change set.
      Returns:
      a list of SNMP variable bindings.
    • getStatus

      public ChangeSet.ChangeStatus getStatus()
      Description copied from interface: ChangeSet
      The status of the change.
      Specified by:
      getStatus in interface ChangeSet<SnmpValueChange>
      Returns:
      the change status.
    • setStatus

      public void setStatus(ChangeSet.ChangeStatus status)
      Description copied from interface: ChangeSet
      Sets the status of the change.
      Specified by:
      setStatus in interface ChangeSet<SnmpValueChange>
      Parameters:
      status - the new status.
    • getErrorStatus

      public SnmpErrorStatus getErrorStatus()
      Description copied from interface: ChangeSet
      Gets the SNMP error status as defined by SnmpErrorStatus.
      Specified by:
      getErrorStatus in interface ChangeSet<SnmpValueChange>
      Returns:
      the error status for this change.
    • getUserReference

      public Object getUserReference()
      Gets the user reference object associated with this change.
      Returns:
      the user reference object.
    • toString

      public String toString()
      Overrides:
      toString in class Object