- java.lang.Object
-
- org.snmp4j.agent.UpdatableMOSupport
-
public class UpdatableMOSupport extends Object
TheUpdatableMOSupportclass provides support for updateUpdatableManagedObjects.- Since:
- 1.2
- Version:
- 1.2
- Author:
- Frank Fock
-
-
Constructor Summary
Constructors Constructor Description UpdatableMOSupport()Creates aUpdatableMOSupportwith undefined (null) last update time and source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetLastUpdate()Gets the date and time of the last update.ObjectgetLastUpdateSource()Gets the object that triggered the last update of this managed object.voidsetLastUpdate(Date lastUpdate)Sets the last update date and time.voidsetLastUpdateNow()Set the last update to the current time.voidsetLastUpdateSource(Object source)Sets the source object of the last update.
-
-
-
Method Detail
-
getLastUpdate
public Date getLastUpdate()
Gets the date and time of the last update.- Returns:
- the Date when the last
UpdatableManagedObject.update(MOQuery updateScope)has been called.
-
setLastUpdate
public void setLastUpdate(Date lastUpdate)
Sets the last update date and time.- Parameters:
lastUpdate- the date and time of the last successful update ornullthe reset/update a managed object on the next access.
-
setLastUpdateNow
public void setLastUpdateNow()
Set the last update to the current time.
-
getLastUpdateSource
public Object getLastUpdateSource()
Gets the object that triggered the last update of this managed object.- Returns:
- an object or
nullif the source of the last update is unknown/undefined.
-
setLastUpdateSource
public void setLastUpdateSource(Object source)
Sets the source object of the last update. The object is not directly referenced by thisUpdatableMOSupport. Instead, aWeakReferenceis used, so that the object source can be garbage collected if it is not referenced elsewhere.- Parameters:
source- an Object that identifies an update source.
-
-