SnmpProxyObject
, SnmpScalarGroupRO
public class SnmpGroupImplRO extends SnmpProxyObjectImpl implements SnmpScalarGroupRO
SnmpGroupImplRO
is a proxy object for a group of read-only scalar objects.
The scalars can be read-write objects based on their MIB definition, however they will be
not accessed by SET SNMP messages (PDUs) when using this proxy.context, oid
Constructor | Description |
---|---|
SnmpGroupImplRO(org.snmp4j.smi.OID groupOID,
org.snmp4j.smi.OctetString context,
List<SnmpScalarRO<?>> scalars) |
Creates a group proxy object with an object identifier (this could be any unique OID
but is typically the OID of the common root node of the supplied scalars).
|
Modifier and Type | Method | Description |
---|---|---|
List<SnmpScalarRO<?>> |
getScalars() |
Gets a list of the scalar proxy objects in this group.
|
TaskId |
reload(SnmpService snmpService,
org.snmp4j.Target target,
VariableBindingMapper variableBindingMapper,
SnmpProxyReloadListener reloadListener) |
Reload the model content of the proxy object from the target SNMP entity asynchronously in the background.
|
void |
setScalars(List<SnmpScalarRO<?>> scalars) |
Sets the list of the scalar proxy objects in this group.
|
boolean |
waitForTask(TaskId taskId,
long timeout) |
Wait until the specified background task terminates.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getOID
getContext, getOID, toString
public SnmpGroupImplRO(org.snmp4j.smi.OID groupOID, org.snmp4j.smi.OctetString context, List<SnmpScalarRO<?>> scalars)
groupOID
- a unique identifier for this group.context
- the SNMP context associated with this proxy object.scalars
- the scalar objects that should build this group.public List<SnmpScalarRO<?>> getScalars()
SnmpScalarGroupRO
getScalars
in interface SnmpScalarGroupRO
public void setScalars(List<SnmpScalarRO<?>> scalars)
SnmpScalarGroupRO
setScalars
in interface SnmpScalarGroupRO
scalars
- the list of scalar proxy objects in this group.public TaskId reload(SnmpService snmpService, org.snmp4j.Target target, VariableBindingMapper variableBindingMapper, SnmpProxyReloadListener reloadListener)
SnmpProxyObject
reload
in interface SnmpProxyObject
snmpService
- the SNMP service to use.target
- the SNMP target (i.e., address, timeouts, etc.) to use.variableBindingMapper
- the variable binding mapper that maps the retrieved SNMP values to model values (based on SNMP types or
specific OID based mappings).reloadListener
- a callback listener that is informed about the reloading status.public boolean waitForTask(TaskId taskId, long timeout)
SnmpProxyObject
waitForTask
in interface SnmpProxyObject
taskId
- the task ID of the task to wait for.timeout
- the maximum time to wait in millis.true
if the task has terminated, false
otherwise.Copyright © 2020 SNMP4J.org. All rights reserved.