Package ucar.nc2.util

Interface CancelTask

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static CancelTask create()  
      boolean isCancel()
      Calling routine may cancel, called routine checks this method, and if true, return asap.
      boolean isDone()
      Application calls to see if task is done.
      void setDone​(boolean done)
      Called routine sets operation was completed.
      void setError​(String msg)
      Called routine got an error, so it sets a message for calling program to show to user.
      void setProgress​(String msg, int progress)
      Called routine may optionally show a progress message for calling program to show to user.
      default void setSuccess()
      Called routine sets whether operation successfully completed.
    • Method Detail

      • isCancel

        boolean isCancel()
        Calling routine may cancel, called routine checks this method, and if true, return asap.
        Returns:
        true if task was cancelled
      • isDone

        boolean isDone()
        Application calls to see if task is done.
      • setDone

        void setDone​(boolean done)
        Called routine sets operation was completed.
      • setSuccess

        default void setSuccess()
        Called routine sets whether operation successfully completed.
      • setError

        void setError​(String msg)
        Called routine got an error, so it sets a message for calling program to show to user.
        Parameters:
        msg - message to show user
      • setProgress

        void setProgress​(String msg,
                         int progress)
        Called routine may optionally show a progress message for calling program to show to user.
        Parameters:
        msg - message to show user
        progress - count of progress