public abstract class AbstractIOTask extends java.lang.Object implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
canceled
indicates whether the task has been canceled
|
private boolean |
failed
indicates whether the task has been failed
|
private java.lang.Exception |
lastException
the last exception caught
|
| Constructor and Description |
|---|
AbstractIOTask()
Constructs a new
AbstractIOTask. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cancel()
Cancel the task
|
java.lang.Exception |
getLastException()
Replies the last exception caught
|
boolean |
isCanceled()
Replies true if the task has been canceled
|
boolean |
isFailed()
Replies true if the task has been failed
|
boolean |
isSuccessful()
Replies true if this task was successful, i.e.
|
protected void |
setCanceled(boolean canceled)
Set whether this task has been canceled
|
protected void |
setFailed(boolean failed)
Sets whether the task has been failed
|
protected void |
setLastException(java.lang.Exception lastException)
Sets the last exception caught
|
private boolean canceled
private boolean failed
private java.lang.Exception lastException
public AbstractIOTask()
AbstractIOTask.public boolean isCanceled()
protected void setCanceled(boolean canceled)
canceled - true, if the task has been canceled; false otherwisepublic boolean isFailed()
protected void setFailed(boolean failed)
failed - whether the task has been failedpublic java.lang.Exception getLastException()
protected void setLastException(java.lang.Exception lastException)
lastException - the last exceptionpublic boolean isSuccessful()
public abstract void cancel()