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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void abort()
      Aborts this task.
      void cancel()
      Cancels this task.
      Throwable getError()
      Gets the task error which is available after the task is completed.
      AsyncTaskProgress getProgress()
      Gets the progress of the asynchronous task.
      Object getResult()
      Gets the result of this task.
      boolean isBusy()
      Gets a value indicating whether this task is currently running.
      boolean isCanceled()
      Gets a value indicating whether this task was canceled.
      boolean isFaulted()
      Gets a value indicating whether this task was faulted.
      void runAsync()
      Runs this task.
      void runAsync(int priority)
      Runs this task.
      void setCompleteCallback(CompleteCallback completeCallback)
      Sets the complete callback delegate.
      void setProgressCallback(ProgressCallback progressCallback)
      Sets the progress callback delegate.
      • Methods inherited from interface com.aspose.ms.System.IAsyncResult

        getAsyncState, getAsyncWaitHandle, getCompletedSynchronously, isCompleted
      • Methods inherited from interface com.aspose.ms.System.IDisposable

        dispose
    • Method Detail

      • getProgress

        AsyncTaskProgress getProgress()

        Gets the progress of the asynchronous task.

        Value: The progress of the asynchronous task.
        Returns:
        the progress 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.

      • setProgressCallback

        void setProgressCallback(ProgressCallback progressCallback)

        Sets the progress callback delegate.

        Parameters:
        progressCallback - The progress callback.
      • setCompleteCallback

        void setCompleteCallback(CompleteCallback completeCallback)

        Sets the complete callback delegate.

        Parameters:
        completeCallback - The complete callback.