Interface RandomAccessManagedObject<SR extends SubRequest<?>>

All Superinterfaces:
ManagedObject<SR>
All Known Implementing Classes:
AgentppSimulationMib.AgentppSimDeleteRow, AgentppSimulationMib.AgentppSimDeleteTableContents, AgentppSimulationMib.AgentppSimMode, DateAndTimeScalar, DefaultMOTable, DisplayStringScalar, EnumeratedScalar, MOScalar, NotificationLogMib.NlmConfigGlobalAgeOut, NotificationLogMib.NlmConfigGlobalEntryLimit, Snmp4jConfigMib.Snmp4jCfgReset, Snmp4jConfigMib.Snmp4jCfgSecSrcAddrValidation, SnmpTsmMib.SnmpTsmConfigurationUsePrefix, SnmpUsmDhObjectsMib.UsmDHParameters, SNMPv2MIB.SysOREntry, SNMPv2MIB.SysUpTimeImpl, TestAndIncr, TimeStampScalar, UsmDHParametersImpl

public interface RandomAccessManagedObject<SR extends SubRequest<?>> extends ManagedObject<SR>
A random access managed object allows to import and export any instance of a ManagedObject to/from a byte array. What forms an instance (a single Variable or a set of those) depends on the particular ManagedObject implementation but have to be consistent across all method implementation of this interface.
Version:
3.2.0
Author:
Frank Fock
  • Method Summary

    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
    Returns the number of instances managed by this ManagedObject.
    Iterator<org.snmp4j.smi.OID>
     
    boolean
    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.

    Methods inherited from interface org.snmp4j.agent.ManagedObject

    cleanup, commit, find, get, getScope, next, prepare, undo
  • Method Details

    • 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.