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

MethodDescription
getProgressEventHandler()Gets the progress event handler of the asynchronous task.
setProgressEventHandler(ProgressEventHandler value)Sets the progress event handler of the asynchronous 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.
getError()Gets the task error which is available after the task is completed.
getResult()Gets the result of this task.
runAsync()Runs this task.
runAsync(int priority)Runs this task.
cancel()Cancels this task.
abort()Aborts this task.
setCompleteCallback(CompleteCallback completeCallback)Sets the complete callback delegate.

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.

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:

ParameterTypeDescription
valueProgressEventHandlerthe progress event handler of the asynchronous 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.

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.

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.

runAsync()

public abstract void runAsync()

Runs this task.

runAsync(int priority)

public abstract void runAsync(int priority)

Runs this task.

Parameters:

ParameterTypeDescription
priorityintThe thread priority.

cancel()

public abstract void cancel()

Cancels this task. The task is completed safely by the controlled stopping of the algorithm.

abort()

public abstract void abort()

Aborts this task. The task is completed immediately, with the risk of not freeing internal unmanaged resources.

setCompleteCallback(CompleteCallback completeCallback)

public abstract void setCompleteCallback(CompleteCallback completeCallback)

Sets the complete callback delegate.

Parameters:

ParameterTypeDescription
completeCallbackCompleteCallbackThe complete callback.