public class DeniableEventObject extends EventObject
DeniableEventObjectdescribes an event that can be canceled through reporting a SNMP error status to the event source.
|Constructor and Description|
Creates an deniable event instance.
|Modifier and Type||Method and Description|
Returns the reason (i.e., SNMPv2/v3 error status) that indicates the error condition that caused this event to be canceled.
Checks whether this event is fired in the preparation phase or the commit phase of the 2PC.
Sets the reason why this event needs to be canceled.
public DeniableEventObject(Object source, boolean deniable)
source- the event source.
truethe event can be canceled by setting its deny reason to a SNMPv2/v3 error status,
falseif 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()
trueif the event can be canceled and thus the event has been fired on behalf of the preparation phase and
falseif it has been fired on behalf of the commit phase.
Copyright © 2016 SNMP4J.org. All rights reserved.