public abstract class SnmpProxyObjectHelper extends Object
SnmpProxyObjectHelper
is an utility class that helps map model values to SNMP and vice versa.Constructor | Description |
---|---|
SnmpProxyObjectHelper() |
Modifier and Type | Method | Description |
---|---|---|
static void |
applyNewValues(VariableBindingMapper variableBindingMapper,
SnmpValuesChangeSet changeSet) |
Convert any new model values in a change set to the corresponding SNMP value and store that SNMP value in the
change set for further processing.
|
static void |
applyOldValues(VariableBindingMapper variableBindingMapper,
SnmpValuesChangeSet changeSet) |
Convert any old model values in a change set to the corresponding SNMP value and store that SNMP value in the
change set for further processing.
|
static List<org.snmp4j.smi.VariableBinding> |
mapObjectsToVB(VariableBindingMapper variableBindingMapper,
List<org.snmp4j.smi.OID> oids,
List<Object> objects) |
Convert a list of objects from their model representation to SNMP variable bindings.
|
static <Type> List<Type> |
mapVBsToObjects(VariableBindingMapper variableBindingMapper,
List<org.snmp4j.smi.VariableBinding> vbs,
List<? extends SnmpProxyColumn> targetColumns) |
Convert a list of objects from their model representation to SNMP variable bindings.
|
public static List<org.snmp4j.smi.VariableBinding> mapObjectsToVB(VariableBindingMapper variableBindingMapper, List<org.snmp4j.smi.OID> oids, List<Object> objects)
variableBindingMapper
- the variable binding mapper used for the conversion.oids
- the object identifiers of the SNMP object types to convert (the n-th OID is associated with the n-th object
of objects
.objects
- the mode object values. The type of the object must match the mapper type for that OID.oids
.public static <Type> List<Type> mapVBsToObjects(VariableBindingMapper variableBindingMapper, List<org.snmp4j.smi.VariableBinding> vbs, List<? extends SnmpProxyColumn> targetColumns)
Type
- the base type of the mapping target objects (that is common to all variable bindings).variableBindingMapper
- the variable binding mapper used for the conversion.vbs
- a list of SNMP variable bindings to convert.targetColumns
- a list of columnar objects that represent the target model structure. The length of this list must match the
length of vbs
list!oids
.public static void applyNewValues(VariableBindingMapper variableBindingMapper, SnmpValuesChangeSet changeSet)
variableBindingMapper
- the variable binding mapper used for the conversion.changeSet
- the change set to be modified.public static void applyOldValues(VariableBindingMapper variableBindingMapper, SnmpValuesChangeSet changeSet)
variableBindingMapper
- the variable binding mapper used for the conversion.changeSet
- the change set to be modified.Copyright © 2020 SNMP4J.org. All rights reserved.