Package org.snmp4j.model.snmp.proxy.impl
Class SnmpValuesChangeSet
java.lang.Object
org.snmp4j.model.snmp.proxy.impl.SnmpValuesChangeSet
- All Implemented Interfaces:
ChangeSet<SnmpValueChange>
The SnmpValuesChangeSet class implements a set of changes that must be
applied atomically.
- Author:
- Frank Fock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.snmp4j.model.snmp.proxy.ChangeSet
ChangeSet.ChangeStatus
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty change set.SnmpValuesChangeSet
(Collection<SnmpValueChange> changes, Object userReference) Creates a change set based on a provided list of changes and with an associated user object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChange
(SnmpValueChange change) Adds a change to the change set.Gets a list of the changes objects.Gets the SNMP error status as defined bySnmpErrorStatus
.Gets all the new values as new a list.The status of the change.Gets the user reference object associated with this change.List<? extends org.snmp4j.smi.VariableBinding>
Gets the variable bindings that are formed by this change set.boolean
Checks if all variables are notnull
.void
setStatus
(ChangeSet.ChangeStatus status) Sets the status of the change.toString()
-
Constructor Details
-
SnmpValuesChangeSet
public SnmpValuesChangeSet()Creates an empty change set. -
SnmpValuesChangeSet
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
Adds a change to the change set.- Parameters:
change
- the new change to add.
-
getChanges
Description copied from interface:ChangeSet
Gets a list of the changes objects.- Specified by:
getChanges
in interfaceChangeSet<SnmpValueChange>
- Returns:
- the changes as a new 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 notnull
.- Returns:
true
if all SNMP variables are set (not null).
-
getVariableBindings
Gets the variable bindings that are formed by this change set.- Returns:
- a list of SNMP variable bindings.
-
getStatus
Description copied from interface:ChangeSet
The status of the change.- Specified by:
getStatus
in interfaceChangeSet<SnmpValueChange>
- Returns:
- the change status.
-
setStatus
Description copied from interface:ChangeSet
Sets the status of the change.- Specified by:
setStatus
in interfaceChangeSet<SnmpValueChange>
- Parameters:
status
- the new status.
-
getErrorStatus
Description copied from interface:ChangeSet
Gets the SNMP error status as defined bySnmpErrorStatus
.- Specified by:
getErrorStatus
in interfaceChangeSet<SnmpValueChange>
- Returns:
- the error status for this change.
-
getUserReference
Gets the user reference object associated with this change.- Returns:
- the user reference object.
-
toString
-