Packages

 

com.aspose.imaging.asynctask

Interface IAsyncTask

  • All Superinterfaces:
    com.aspose.ms.System.IAsyncResult, com.aspose.ms.System.IDisposable


    public interface IAsyncTask
    extends com.aspose.ms.System.IAsyncResult, com.aspose.ms.System.IDisposable

    The asynchronous task.

    See Also:
    IAsyncResult, IDisposable
    • Method Detail

      • getProgressEventHandler

        ProgressEventHandler getProgressEventHandler()

        Gets the progress event handler of the asynchronous task.

        Value: The progress event handler of the asynchronous task.
        Returns:
        the progress event handler of the asynchronous task.
      • setProgressEventHandler

        void setProgressEventHandler(ProgressEventHandler value)

        Sets the progress event handler of the asynchronous task.

        Value: The progress event handler of the asynchronous task.
        Parameters:
        value - the progress event handler of the asynchronous task.
      • isBusy

        boolean isBusy()

        Gets a value indicating whether this task is currently running.

        Value: true if this task is currently running; otherwise, false.
        Returns:
        a value indicating whether this task is currently running.
      • isCanceled

        boolean isCanceled()

        Gets a value indicating whether this task was canceled.

        Value: true if this task was canceled; otherwise, false.
        Returns:
        a value indicating whether this task was canceled.
      • isFaulted

        boolean isFaulted()

        Gets a value indicating whether this task was faulted.

        Value: true if this task was faulted; otherwise, false.
        Returns:
        a value indicating whether this task was faulted.
      • getError

        Throwable getError()

        Gets the task error which is available after the task is completed.

        Value: The task error.
        Returns:
        the task error which is available after the task is completed.
      • getResult

        Object getResult()

        Gets the result of this task.

        Value: The result of this task.
        Returns:
        the result of this task.
      • runAsync

        void runAsync()

        Runs this task.

      • runAsync

        void runAsync(int priority)

        Runs this task.

        Parameters:
        priority - The thread priority.
      • cancel

        void cancel()

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

      • abort

        void abort()

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

      • setCompleteCallback

        void setCompleteCallback(CompleteCallback completeCallback)

        Sets the complete callback delegate.

        Parameters:
        completeCallback - The complete callback.