org.snmp4j.agent.mo
Class DeniableEventObject
java.lang.Object
java.util.EventObject
org.snmp4j.agent.mo.DeniableEventObject
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- MOChangeEvent, MOTableRowEvent, RowStatusEvent
public class DeniableEventObject
- extends java.util.EventObject
The DeniableEventObject describes an event that can be canceled
through reporting a SNMP error status to the event source.
- Since:
- 1.1
- Version:
- 1.1
- Author:
- Frank Fock
- See Also:
- Serialized Form
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
DeniableEventObject(java.lang.Object source,
boolean deniable)
Creates an deniable event instance. |
|
Method Summary |
int |
getDenyReason()
Returns the reason (i.e., SNMPv2/v3 error status) that indicates the error
condition that caused this event to be canceled. |
boolean |
isDeniable()
Checks whether this event is fired in the preparation phase or the commit
phase of the 2PC. |
void |
setDenyReason(int denyReason)
Sets the reason why this event needs to be canceled. |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DeniableEventObject
public DeniableEventObject(java.lang.Object source,
boolean deniable)
- Creates an deniable event instance.
- Parameters:
source - the event source.deniable - if true the event can be canceled by setting its deny
reason to a SNMPv2/v3 error status, false if the event
cannot be canceled, because, for example, it is fired on behalf of
the commit phase of a 2PC transaction.
setDenyReason
public void setDenyReason(int denyReason)
- Sets the reason why this event needs to be canceled. A reason other than
zero will cancel the change if it has not been performed yet.
- Parameters:
denyReason - a SNMPv2/v3 error status.
getDenyReason
public int getDenyReason()
- Returns the reason (i.e., SNMPv2/v3 error status) that indicates the error
condition that caused this event to be canceled.
- Returns:
- a SNMP2v/v3 error status.
isDeniable
public boolean isDeniable()
- Checks whether this event is fired in the preparation phase or the commit
phase of the 2PC.
- Returns:
true if the event can be canceled and thus the event has
been fired on behalf of the preparation phase and false
if it has been fired on behalf of the commit phase.
Copyright © 2011 SNMP4J.org. All Rights Reserved.