Interface RandomAccessManagedObject<SR extends SubRequest<?>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      List<org.snmp4j.smi.VariableBinding> exportInstance​(org.snmp4j.smi.OID instanceSubID)
      Exports the byte representation of an instance of the ManagedObject.
      default org.snmp4j.smi.OID getInstanceSubID​(org.snmp4j.smi.OID instanceOID)
      Returns the instance sub-identifier suffix for the given instance OID.
      boolean importInstance​(org.snmp4j.smi.OID instanceSubID, List<org.snmp4j.smi.VariableBinding> data, ImportMode importMode)
      Imports the data that internally represents the instance specified by the OID suffix instanceID from the byte data provided which can be encoded in any representation the ManagedObject is able to understand.
      int instanceCount()
      Returns the number of instances managed by this ManagedObject.
      Iterator<org.snmp4j.smi.OID> instanceIterator()  
      boolean isVolatile()
      Tests if this instance of a SerializableManagedObject should be serialized or deserialized through persistent storage load or save operation.
      default boolean isVolatile​(org.snmp4j.smi.OID instanceSubID)
      Tests if the specified instance should be serialized or deserialized through persistent storage load or save operation.
    • Method Detail

      • importInstance

        boolean importInstance​(org.snmp4j.smi.OID instanceSubID,
                               List<org.snmp4j.smi.VariableBinding> data,
                               ImportMode importMode)
        Imports the data that internally represents the instance specified by the OID suffix instanceID from the byte data provided which can be encoded in any representation the ManagedObject is able to understand.
        Parameters:
        instanceSubID - the OID suffix identifying the instance to export, for scalars this is "0" and for tabular objects this is the row index.
        data - the SNMP data of the instance where the OID identifies the sub-instance (i.e. the column sub-ID for row instances and "0" for scalar objects).
        importMode - defines the import strategy - must not be null!
        Returns:
        true if the import was successful, false otherwise.
      • exportInstance

        List<org.snmp4j.smi.VariableBinding> exportInstance​(org.snmp4j.smi.OID instanceSubID)
        Exports the byte representation of an instance of the ManagedObject.
        Parameters:
        instanceSubID - the OID suffix identifying the instance to export, for scalars this is "0" and for tabular objects this is the row index.
        Returns:
        the SNMP data of the instance where the OID identifies the sub-instance (i.e. the column sub-ID for row instances and "0" for scalar objects).
      • isVolatile

        default boolean isVolatile​(org.snmp4j.smi.OID instanceSubID)
        Tests if the specified instance should be serialized or deserialized through persistent storage load or save operation.
        Parameters:
        instanceSubID - the OID suffix identifying the instance to check, for scalars this is "0" and for tabular objects this is the row index.
        Returns:
        true if the specified sub-instance exists and is StorageType.volatile_.
        Since:
        3.2.0
      • instanceIterator

        Iterator<org.snmp4j.smi.OID> instanceIterator()
      • instanceCount

        int instanceCount()
        Returns the number of instances managed by this ManagedObject.
        Returns:
        the number of instances managed by this object.
      • isVolatile

        boolean isVolatile()
        Tests if this instance of a SerializableManagedObject should be serialized or deserialized through persistent storage load or save operation.
        Returns:
        true if persistent storage operations should ignore this ManagedObject and false if this object should be saved/loaded to/from persistent storage.
      • getInstanceSubID

        default org.snmp4j.smi.OID getInstanceSubID​(org.snmp4j.smi.OID instanceOID)
        Returns the instance sub-identifier suffix for the given instance OID. Any implementations of this method must use the same instance notion of instance identifier as importInstance(OID, List, ImportMode), exportInstance(OID), and instanceIterator().
        Parameters:
        instanceOID - the fully qualified OID of a SNMP Variable.
        Returns:
        the instance ID that uniquely identifies the object instance the specified Variable belongs to within this RandomAccessManagedObject.