public class DeniableEventObject extends EventObject
DeniableEventObject
describes an event that can be canceled
through reporting a SNMP error status to the event source.source
Constructor and Description |
---|
DeniableEventObject(Object source,
boolean deniable)
Creates an deniable event instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getSource, toString
public DeniableEventObject(Object source, boolean deniable)
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.public void setDenyReason(int denyReason)
denyReason
- a SNMPv2/v3 error status.public int getDenyReason()
public boolean isDeniable()
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 © 2016 SNMP4J.org. All rights reserved.