IAsyncTask
All Implemented Interfaces: com.aspose.ms.System.IAsyncResult, com.aspose.ms.System.IDisposable
public interface IAsyncTask extends System.IAsyncResult, System.IDisposable
The asynchronous task.
Methods
Method | Description |
---|---|
abort() | Aborts this task. |
cancel() | Cancels this task. |
getError() | Gets the task error which is available after the task is completed. |
getProgressEventHandler() | Gets the progress event handler of the asynchronous task. |
getResult() | Gets the result of this task. |
isBusy() | Gets a value indicating whether this task is currently running. |
isCanceled() | Gets a value indicating whether this task was canceled. |
isFaulted() | Gets a value indicating whether this task was faulted. |
runAsync() | Runs this task. |
runAsync(int priority) | Runs this task. |
setCompleteCallback(CompleteCallback completeCallback) | Sets the complete callback delegate. |
setProgressEventHandler(ProgressEventHandler value) | Sets the progress event handler of the asynchronous task. |
abort()
public abstract void abort()
Aborts this task. The task is completed immediately, with the risk of not freeing internal unmanaged resources.
cancel()
public abstract void cancel()
Cancels this task. The task is completed safely by the controlled stopping of the algorithm.
getError()
public abstract Throwable getError()
Gets the task error which is available after the task is completed.
Value: The task error.
Returns: java.lang.Throwable - the task error which is available after the task is completed.
getProgressEventHandler()
public abstract ProgressEventHandler getProgressEventHandler()
Gets the progress event handler of the asynchronous task.
Value: The progress event handler of the asynchronous task.
Returns: ProgressEventHandler - the progress event handler of the asynchronous task.
getResult()
public abstract Object getResult()
Gets the result of this task.
Value: The result of this task.
Returns: java.lang.Object - the result of this task.
isBusy()
public abstract boolean isBusy()
Gets a value indicating whether this task is currently running.
Value: true if this task is currently running; otherwise, false .
Returns: boolean - a value indicating whether this task is currently running.
isCanceled()
public abstract boolean isCanceled()
Gets a value indicating whether this task was canceled.
Value: true if this task was canceled; otherwise, false .
Returns: boolean - a value indicating whether this task was canceled.
isFaulted()
public abstract boolean isFaulted()
Gets a value indicating whether this task was faulted.
Value: true if this task was faulted; otherwise, false .
Returns: boolean - a value indicating whether this task was faulted.
runAsync()
public abstract void runAsync()
Runs this task.
runAsync(int priority)
public abstract void runAsync(int priority)
Runs this task.
Parameters:
Parameter | Type | Description |
---|---|---|
priority | int | The thread priority. |
setCompleteCallback(CompleteCallback completeCallback)
public abstract void setCompleteCallback(CompleteCallback completeCallback)
Sets the complete callback delegate.
Parameters:
Parameter | Type | Description |
---|---|---|
completeCallback | CompleteCallback | The complete callback. |
setProgressEventHandler(ProgressEventHandler value)
public abstract void setProgressEventHandler(ProgressEventHandler value)
Sets the progress event handler of the asynchronous task.
Value: The progress event handler of the asynchronous task.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ProgressEventHandler | the progress event handler of the asynchronous task. |