Class SnmpGroupImplRO

java.lang.Object
org.snmp4j.model.snmp.proxy.impl.SnmpProxyObjectImpl
org.snmp4j.model.snmp.proxy.impl.SnmpGroupImplRO
All Implemented Interfaces:
SnmpProxyObject, SnmpScalarGroupRO

public class SnmpGroupImplRO extends SnmpProxyObjectImpl implements 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
  • 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

      public List<SnmpScalarRO<?>> getScalars()
      Description copied from interface: SnmpScalarGroupRO
      Gets a list of the scalar proxy objects in this group.
      Specified by:
      getScalars in interface SnmpScalarGroupRO
      Returns:
      the list of scalar proxy objects in this group.
    • setScalars

      public void setScalars(List<SnmpScalarRO<?>> scalars)
      Description copied from interface: SnmpScalarGroupRO
      Sets the list of the scalar proxy objects in this group.
      Specified by:
      setScalars in interface SnmpScalarGroupRO
      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 interface SnmpProxyObject
      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

      public boolean waitForTask(TaskId taskId, long timeout)
      Description copied from interface: SnmpProxyObject
      Wait until the specified background task terminates.
      Specified by:
      waitForTask in interface SnmpProxyObject
      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.