org.snmp4j.agent
Interface ManagedObject

All Known Subinterfaces:
ManagedObjectValueAccess, MOTable<R,C,M>, RegisteredManagedObject, SerializableManagedObject, UpdatableManagedObject
All Known Implementing Classes:
AgentppSimulationMib.AgentppSimDeleteRow, AgentppSimulationMib.AgentppSimDeleteTableContents, AgentppSimulationMib.AgentppSimMode, DateAndTimeScalar, DefaultMOTable, DisplayStringScalar, EnumeratedScalar, MOScalar, MOSubtreeProxy, NotificationLogMib.NlmConfigGlobalAgeOut, NotificationLogMib.NlmConfigGlobalEntryLimit, Snmp4jConfigMib.Snmp4jCfgSecSrcAddrValidation, Snmp4jDemoMib.Snmp4jDemoScalar, Snmp4jHeartbeatMib.Snmp4jAgentHBRefTime, SnmpTsmMib.SnmpTsmConfigurationUsePrefix, SNMPv2MIB.SysOREntry, SNMPv2MIB.SysUpTimeImpl, StaticMOGroup, TestAndIncr, TimeStampScalar

public interface ManagedObject

The ManagedObject interface defines the basic operations for all SNMP(4J) manageable objects.

Version:
1.0
Author:
Frank Fock

Method Summary
 void cleanup(SubRequest request)
          Cleansup a (sub)request and frees all resources locked during the preparation phase.
 void commit(SubRequest request)
          Commits a previously prepared SET (sub)request.
 org.snmp4j.smi.OID find(MOScope range)
          Finds the first object ID (OID) in the specified search range.
 void get(SubRequest request)
          Processes a GET request and return the result in the supplied sub-request.
 MOScope getScope()
          Returns the scope of object identifiers this managed object is managing.
 boolean next(SubRequest request)
          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.
 void prepare(SubRequest request)
          Prepares a SET (sub)request.
 void undo(SubRequest request)
          Compensates (undo) a (sub)request when a commit of another subrequest failed with an error.
 

Method Detail

getScope

MOScope getScope()
Returns 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)
Finds 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.

get

void get(SubRequest request)
Processes a GET request and return the result in the supplied sub-request.

Parameters:
request - the SubRequest to process.

next

boolean next(SubRequest request)
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 - the SubRequest to process.
Returns:
true if the search request found an appropriate instance, false otherwise.

prepare

void prepare(SubRequest request)
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 - the SubRequest to process.

commit

void commit(SubRequest request)
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 - the SubRequest to process.

undo

void undo(SubRequest request)
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 - the SubRequest to process.

cleanup

void cleanup(SubRequest request)
Cleansup a (sub)request and frees all resources locked during the preparation phase.

Parameters:
request - the SubRequest to process.

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.