java.lang.Object
java.util.EventObject
org.snmp4j.agent.mo.DeniableEventObject
org.snmp4j.agent.mo.MOChangeEvent
- All Implemented Interfaces:
Serializable
The
MOChangeEvent
describes the change of a single value of
a ManagedObject
.- Version:
- 3.2.3
- Author:
- Frank Fock
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionMOChangeEvent
(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification) Creates a deniableMOChangeEvent
object based on the changed managed object instances that are identified through a common the instance OID (i.e.MOChangeEvent
(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification, SubRequest<?> subRequest) Creates a deniableMOChangeEvent
object based on the changed managed object instances that are identified through a common the instance OID (i.e.MOChangeEvent
(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue) Creates a deniableMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value.MOChangeEvent
(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable) Creates aMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value.MOChangeEvent
(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable, SubRequest<?> subRequest) Creates aMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value. -
Method Summary
Modifier and TypeMethodDescriptionGets the type of the modification.protected MOChangeEvent.Modification
getModificationFromValues
(org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue) org.snmp4j.smi.Variable
org.snmp4j.smi.OID
getOID()
Gets the representation type of the OID of the event as defined byMOChangeEvent.OidType
.org.snmp4j.smi.Variable
SubRequest
<?> Get theSubRequest
that triggered this change.toString()
Methods inherited from class org.snmp4j.agent.mo.DeniableEventObject
getDenyReason, isDeniable, setDenyReason
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
MOChangeEvent
public MOChangeEvent(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue) Creates a deniableMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value.- Parameters:
source
- the event source.changedObject
- theManagedObject
whose value is changed.oid
- the instance OID of the changed instance.oldValue
- the old value.newValue
- the new value.
-
MOChangeEvent
public MOChangeEvent(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification) Creates a deniableMOChangeEvent
object 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
- theManagedObject
whose 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(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID index, MOChangeEvent.Modification modification, SubRequest<?> subRequest) Creates a deniableMOChangeEvent
object 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
- theManagedObject
whose 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.subRequest
- the subRequest that triggered the change. This might bynull
if the change was not triggered by a SNMP, AgentX, or similar external request or if the request cannot be identified through the call hierarchy.- Since:
- 3.2.3
-
MOChangeEvent
public MOChangeEvent(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable) Creates aMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value.- Parameters:
source
- the event source.changedObject
- theManagedObject
whose 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
-
MOChangeEvent
public MOChangeEvent(Object source, ManagedObject<SubRequest<?>> changedObject, org.snmp4j.smi.OID oid, org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue, boolean deniable, SubRequest<?> subRequest) Creates aMOChangeEvent
object based on the changed managed object, the instance OID of the changed value, with old and new value.- Parameters:
source
- the event source.changedObject
- theManagedObject
whose 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.subRequest
- the subRequest that triggered the change. This might bynull
if the change was not triggered by a SNMP, AgentX, or similar external request.- Since:
- 3.2.3
-
-
Method Details
-
getModificationFromValues
protected MOChangeEvent.Modification getModificationFromValues(org.snmp4j.smi.Variable oldValue, org.snmp4j.smi.Variable newValue) -
getChangedObject
-
getOID
public org.snmp4j.smi.OID getOID() -
getOldValue
public org.snmp4j.smi.Variable getOldValue() -
getNewValue
public org.snmp4j.smi.Variable getNewValue() -
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
Gets the representation type of the OID of the event as defined byMOChangeEvent.OidType
. The typeMOChangeEvent.OidType.index
refers to the row index of aMOTable
ManagedObject
. All other types refer to a single instance OID, whereasMOChangeEvent.OidType.fullyQualified
includes theOID
of theManagedObject
andMOChangeEvent.OidType.instanceSuffix
does not.- Returns:
- the type of the OID returned by
getOID()
. - Since:
- 3.0
-
getSubRequest
Get theSubRequest
that triggered this change. Ifnull
there is either no SNMP or AgentX request that triggered this change or the request cannot be identified.- Returns:
- the
SubRequest
that triggered this change ornull
if that is not known. - Since:
- 3.2.3
-
toString
- Overrides:
toString
in classEventObject
-