- java.lang.Object
-
- java.util.EventObject
-
- org.snmp4j.agent.mo.DeniableEventObject
-
- org.snmp4j.agent.mo.MOChangeEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class MOChangeEvent extends DeniableEventObject
TheMOChangeEventdescribes the change of a single value of aManagedObject.- Version:
- 3.0
- Author:
- Frank Fock
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMOChangeEvent.Modificationstatic classMOChangeEvent.OidType
-
Constructor Summary
Constructors Constructor Description MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification)Creates a deniableMOChangeEventobject based on the changed managed object instances that are identified through a common the instance OID (i.e.MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue)Creates a deniableMOChangeEventobject based on the changed managed object, the instance OID of the changed value, with old and new value.MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable)Creates aMOChangeEventobject based on the changed managed object, the instance OID of the changed value, with old and new value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedObjectgetChangedObject()MOChangeEvent.ModificationgetModification()Gets the type of the modification.protected MOChangeEvent.ModificationgetModificationFromValues(org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue)org.snmp4j.smi.VariablegetNewValue()org.snmp4j.smi.OIDgetOID()MOChangeEvent.OidTypegetOidType()Gets the representation type of the OID of the event as defined byMOChangeEvent.OidType.org.snmp4j.smi.VariablegetOldValue()java.lang.StringtoString()-
Methods inherited from class org.snmp4j.agent.mo.DeniableEventObject
getDenyReason, isDeniable, setDenyReason
-
-
-
-
Constructor Detail
-
MOChangeEvent
public MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue)Creates a deniableMOChangeEventobject based on the changed managed object, the instance OID of the changed value, with old and new value.- Parameters:
source- the event source.changedObject- theManagedObjectwhose value is changed.oid- the instance OID of the changed instance.oldValue- the old value.newValue- the new value.
-
MOChangeEvent
public MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification)Creates a deniableMOChangeEventobject based on the changed managed object instances that are identified through a common the instance OID (i.e. their row index) and with a list of old and new values.- Parameters:
source- the event source.changedObject- theManagedObjectwhose value is changed.index- the instance OID of the changed instance (i.e. row index).modification- identifies the type of modification that triggered the event.- Since:
- 3.0
-
MOChangeEvent
public MOChangeEvent(java.lang.Object source, ManagedObject changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable)Creates aMOChangeEventobject based on the changed managed object, the instance OID of the changed value, with old and new value.- Parameters:
source- the event source.changedObject- theManagedObjectwhose value is changed.oid- the instance OID of the changed instance.oldValue- the old value.newValue- the new value.deniable- indicates whether the event can be canceled through setting its denyReason member to a SNMP error status.- Since:
- 1.1
-
-
Method Detail
-
getModificationFromValues
protected MOChangeEvent.Modification getModificationFromValues(org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue)
-
getChangedObject
public ManagedObject getChangedObject()
-
getOID
public org.snmp4j.smi.OID getOID()
-
getOldValue
public org.snmp4j.smi.Variable getOldValue()
-
getNewValue
public org.snmp4j.smi.Variable getNewValue()
-
getModification
public MOChangeEvent.Modification getModification()
Gets the type of the modification. This could be implicitly determined bygetModificationFromValues(Variable, Variable)object construction or explicitly set by a suitable constructor.- Returns:
- a modification type as defined by
MOChangeEvent.Modification. - Since:
- 3.0
-
getOidType
public MOChangeEvent.OidType getOidType()
Gets the representation type of the OID of the event as defined byMOChangeEvent.OidType. The typeMOChangeEvent.OidType.indexrefers to the row index of aMOTableManagedObject. All other types refer to a single instance OID, whereasMOChangeEvent.OidType.fullyQualifiedincludes theOIDof theManagedObjectandMOChangeEvent.OidType.instanceSuffixdoes not.- Returns:
- the type of the OID returned by
getOID(). - Since:
- 3.0
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.EventObject
-
-