T
- specifies the common base value type for all model values in the sub-tree.SnmpProxyObject
, SnmpSubTreeRO<T>
public class SnmpSubTreeImplRO<T> extends SnmpProxyObjectImpl implements SnmpSubTreeRO<T>
SnmpSubTreeImplRO
class implements a read-only SnmpProxyObject
for MIB sub-trees.context, oid
Constructor | Description |
---|---|
SnmpSubTreeImplRO(org.snmp4j.smi.OID oid,
org.snmp4j.smi.OctetString context,
Class<T> valueClass) |
Creates a sub-tree proxy based on the sub-tree root
OID and the common value class for the model values. |
Modifier and Type | Method | Description |
---|---|---|
org.snmp4j.smi.OID |
getOID() |
Gets the unique identifier of this proxy object.
|
SortedMap<org.snmp4j.smi.OID,T> |
getValues() |
Get the model value map for this subtree.
|
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.
|
String |
toString() |
|
boolean |
waitForTask(TaskId taskId,
long timeout) |
Wait until the specified background task terminates.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext
getContext
public SnmpSubTreeImplRO(org.snmp4j.smi.OID oid, org.snmp4j.smi.OctetString context, Class<T> valueClass)
OID
and the common value class for the model values.oid
- the root object identifier of the sub-tree.context
- the SNMPv3 context of the sub-tree,valueClass
- the common value class for the model values in the sub-tree. If no common class is available, Object
should be used.public SortedMap<org.snmp4j.smi.OID,T> getValues()
SnmpSubTreeRO
getValues
in interface SnmpSubTreeRO<T>
public org.snmp4j.smi.OID getOID()
SnmpProxyObject
getOID
in interface SnmpProxyObject
getOID
in class SnmpProxyObjectImpl
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.public String toString()
toString
in class SnmpProxyObjectImpl
Copyright © 2020 SNMP4J.org. All rights reserved.