public abstract class ProgressManagerAdapter
extends java.lang.Object
| Constructor and Description |
|---|
ProgressManagerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkCanceled()
Checks if the progress indicator associated with the current thread has been canceled and, if
so, throws an unchecked exception.
|
protected abstract void |
doCheckCanceled() |
protected void |
doThrowIfCancellation(java.lang.Throwable t) |
protected static void |
setInstance(ProgressManagerAdapter instance) |
static void |
throwIfCancellation(java.lang.Throwable t)
Rethrows the given exception if it means that the current computation was cancelled.
|
public static void checkCanceled()
public static void throwIfCancellation(@NonNull
java.lang.Throwable t)
try {
// Code that calls ProgressManagerAdapter.checkCancelled()
}
catch (Exception e) {
ProgressManagerAdapter.throwIfCancellation(e);
// Handle other exceptions.
}
protected abstract void doCheckCanceled()
protected void doThrowIfCancellation(@NonNull
java.lang.Throwable t)
protected static void setInstance(@NonNull
ProgressManagerAdapter instance)