Interface ManagedObject<SR extends SubRequest<?>>

All Known Subinterfaces:
ChangeableManagedObject<SR>, GenericManagedObject, ManagedObjectValueAccess<SR>, MOTable<R,C,M>, RandomAccessManagedObject<SR>, RegisteredManagedObject<SR>, SerializableManagedObject<SR>, UpdatableManagedObject<SR>
All Known Implementing Classes:
AgentppSimulationMib.AgentppSimDeleteRow, AgentppSimulationMib.AgentppSimDeleteTableContents, AgentppSimulationMib.AgentppSimMode, DateAndTimeScalar, DefaultMOTable, DisplayStringScalar, EnumeratedScalar, MOScalar, MOSubtreeProxy, NotificationLogMib.NlmConfigGlobalAgeOut, NotificationLogMib.NlmConfigGlobalEntryLimit, Snmp4jConfigMib.Snmp4jCfgReset, Snmp4jConfigMib.Snmp4jCfgSecSrcAddrValidation, SnmpTsmMib.SnmpTsmConfigurationUsePrefix, SnmpUsmDhObjectsMib.UsmDHParameters, SNMPv2MIB.SysOREntry, SNMPv2MIB.SysUpTimeImpl, StaticMOGroup, TestAndIncr, TimeStampScalar, UsmDHParametersImpl

public interface ManagedObject<SR extends SubRequest<?>>
The ManagedObject interface defines the basic operations for all SNMP4J manageable objects.
Version:
3.8.0
Author:
Frank Fock
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanup(SR request)
    Cleanup a (sub)request and free all resources locked during the preparation phase.
    void
    commit(SR request)
    Commit a previously prepared SET (sub)request.
    default org.snmp4j.smi.OID
    find(MOQuery query, Function<org.snmp4j.smi.OID,Boolean> filter)
    Find the first object ID (OID) in the specified search range.
    org.snmp4j.smi.OID
    find(MOScope range)
    Find the first object ID (OID) in the specified search range.
    void
    get(SR request)
    Process a GET request and return the result in the supplied sub-request.
    Return the scope of object identifiers this managed object is managing.
    boolean
    next(SR request)
    Deprecated.
    Use next(SubRequest, Function) instead to apply VACM inner ManagedObject OID filtering.
    default boolean
    next(SR request, Function<org.snmp4j.smi.OID,Boolean> filter)
    Find the successor instance for the object instance ID (OID) given by the supplied sub-request and returns it within the supplied sub-request object.
    void
    prepare(SR request)
    Prepare a SET (sub)request.
    void
    undo(SR request)
    Compensate (undo) a (sub)request when a commit of another subrequest failed with an error.
  • Method Details

    • getScope

      MOScope getScope()
      Return the scope of object identifiers this managed object is managing.
      Returns:
      the MOScope that defines a range (possibly also a single or none instance OID) of object IDs managed by this managed object.
    • find

      org.snmp4j.smi.OID find(MOScope range)
      Find the first object ID (OID) in the specified search range.
      Parameters:
      range - the MOScope for the search.
      Returns:
      the OID that is included in the search range and null if no such instances could be found.
    • find

      default org.snmp4j.smi.OID find(MOQuery query, Function<org.snmp4j.smi.OID,Boolean> filter)
      Find the first object ID (OID) in the specified search range.
      Parameters:
      query - the MOQuery for the search.
      filter - the filter criteria that needs to be true on the OID to be returned. If the filter returns false on Function.apply(Object) then the next OID is being tested that is in the provided range.
      Returns:
      the first OID that is included in the search range and for which the filter criteria is true. Otherwise null if no such instances could be found.
      Since:
      3.8.0
    • get

      void get(SR request)
      Process a GET request and return the result in the supplied sub-request.
      Parameters:
      request - the SubRequest to process.
    • next

      boolean next(SR request)
      Deprecated.
      Use next(SubRequest, Function) instead to apply VACM inner ManagedObject OID filtering. This is import especially for multi OID objects like tables and subtrees.
      Find the successor instance for the object instance ID (OID) given by the supplied sub-request and returns it within the supplied sub-request object.
      Parameters:
      request - the SubRequest to process.
      Returns:
      true if the search request found an appropriate instance, false otherwise.
    • next

      default boolean next(SR request, Function<org.snmp4j.smi.OID,Boolean> filter)
      Find the successor instance for the object instance ID (OID) given by the supplied sub-request and returns it within the supplied sub-request object.
      Parameters:
      request - the SubRequest to process.
      filter - the filter criteria that needs to be true on the OID to be returned. If the filter returns false on Function.apply(Object) then the next OID is being tested that is in the provided request's range.
      Returns:
      true if the search request found an appropriate instance, false otherwise.
      Since:
      3.8.0
    • prepare

      void prepare(SR request)
      Prepare a SET (sub)request. This method represents the first phase of a two phase commit. During preparation all necessary resources should be locked in order to be able to execute the commit without claiming additional resources.
      Parameters:
      request - the SubRequest to process.
    • commit

      void commit(SR request)
      Commit a previously prepared SET (sub)request. This is the second phase of a two phase commit. The change is committed but the resources locked during prepare not freed yet.
      Parameters:
      request - the SubRequest to process.
    • undo

      void undo(SR request)
      Compensate (undo) a (sub)request when a commit of another subrequest failed with an error. This also frees any resources locked during the preparation phase.
      Parameters:
      request - the SubRequest to process.
    • cleanup

      void cleanup(SR request)
      Cleanup a (sub)request and free all resources locked during the preparation phase.
      Parameters:
      request - the SubRequest to process.