Class CancellationFlag
- java.lang.Object
-
- org.jboss.as.ejb3.component.interceptors.CancellationFlag
-
public final class CancellationFlag extends Object
An invocation cancellation flag.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description CancellationFlag()Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean setFlag)Attempt to cancel the corresponding invocation.booleanisCancelFlagSet()Determine if the cancel flag was set.booleanisCancelled()Determine if the request was cancelled before it could complete.booleanrunIfNotCancelled()Attempt to determine whether the invocation should proceed or whether it should be cancelled.
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean setFlag)
Attempt to cancel the corresponding invocation.- Parameters:
setFlag-trueto set the Jakarta Enterprise Beans context cancellation flag (or equivalent),falseotherwise- Returns:
trueif the invocation was definitely cancelled, orfalseif it was not cancelled or it could not be determined if it was cancelled
-
runIfNotCancelled
public boolean runIfNotCancelled()
Attempt to determine whether the invocation should proceed or whether it should be cancelled. This method should only be called once per flag instance.- Returns:
trueif the invocation should proceed, orfalseif it was cancelled
-
isCancelFlagSet
public boolean isCancelFlagSet()
Determine if the cancel flag was set.- Returns:
trueif the flag was set,falseotherwise
-
isCancelled
public boolean isCancelled()
Determine if the request was cancelled before it could complete.- Returns:
trueif the request was cancelled,falseotherwise
-
-