Package org.snmp4j.model.snmp.proxy.impl
Class SnmpGroupImplRO
java.lang.Object
org.snmp4j.model.snmp.proxy.impl.SnmpProxyObjectImpl
org.snmp4j.model.snmp.proxy.impl.SnmpGroupImplRO
- All Implemented Interfaces:
SnmpProxyObject
,SnmpScalarGroupRO
The
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.- Author:
- Frank Fock
-
Field Summary
Fields inherited from class org.snmp4j.model.snmp.proxy.impl.SnmpProxyObjectImpl
context, oid
-
Constructor Summary
ConstructorsConstructorDescriptionSnmpGroupImplRO
(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). -
Method Summary
Modifier and TypeMethodDescriptionList<SnmpScalarRO<?>>
Gets a list of the scalar proxy objects in this group.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.Methods inherited from class org.snmp4j.model.snmp.proxy.impl.SnmpProxyObjectImpl
getContext, getOID, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.snmp4j.model.snmp.proxy.SnmpProxyObject
getContext, getOID
-
Constructor Details
-
SnmpGroupImplRO
public 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).- Parameters:
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.
-
-
Method Details
-
getScalars
Description copied from interface:SnmpScalarGroupRO
Gets a list of the scalar proxy objects in this group.- Specified by:
getScalars
in interfaceSnmpScalarGroupRO
- Returns:
- the list of scalar proxy objects in this group.
-
setScalars
Description copied from interface:SnmpScalarGroupRO
Sets the list of the scalar proxy objects in this group.- Specified by:
setScalars
in interfaceSnmpScalarGroupRO
- Parameters:
scalars
- the list of scalar proxy objects in this group.
-
reload
public TaskId reload(SnmpService snmpService, org.snmp4j.Target target, VariableBindingMapper variableBindingMapper, SnmpProxyReloadListener reloadListener) Description copied from interface:SnmpProxyObject
Reload the model content of the proxy object from the target SNMP entity asynchronously in the background.- Specified by:
reload
in interfaceSnmpProxyObject
- Parameters:
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.- Returns:
- the task ID for the background task.
-
waitForTask
Description copied from interface:SnmpProxyObject
Wait until the specified background task terminates.- Specified by:
waitForTask
in interfaceSnmpProxyObject
- Parameters:
taskId
- the task ID of the task to wait for.timeout
- the maximum time to wait in millis.- Returns:
true
if the task has terminated,false
otherwise.
-