- 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.1.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionvoidCleansup a (sub)request and frees all resources locked during the preparation phase.voidCommits a previously prepared SET (sub)request.org.snmp4j.smi.OIDFinds the first object ID (OID) in the specified search range.voidProcesses a GET request and return the result in the supplied sub-request.getScope()Returns the scope of object identifiers this managed object is managing.booleanFinds the successor instance for the object instance ID (OID) given by the supplied sub-request and returns it within the supplied sub-request object.voidPrepares a SET (sub)request.voidCompensates (undo) a (sub)request when a commit of another subrequest failed with an error.
-
Method Details
-
getScope
MOScope getScope()Returns the scope of object identifiers this managed object is managing.- Returns:
- the
MOScopethat defines a range (possibly also a single or none instance OID) of object IDs managed by this managed object.
-
find
Finds the first object ID (OID) in the specified search range.- Parameters:
range- theMOScopefor the search.- Returns:
- the
OIDthat is included in the searchrangeandnullif no such instances could be found.
-
get
Processes a GET request and return the result in the supplied sub-request.- Parameters:
request- theSubRequestto process.
-
next
Finds 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- theSubRequestto process.- Returns:
trueif the search request found an appropriate instance,falseotherwise.
-
prepare
Prepares 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- theSubRequestto process.
-
commit
Commits 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- theSubRequestto process.
-
undo
Compensates (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- theSubRequestto process.
-
cleanup
Cleansup a (sub)request and frees all resources locked during the preparation phase.- Parameters:
request- theSubRequestto process.
-