Package ucar.nc2.util

Class CancelTaskImpl

  • All Implemented Interfaces:
    CancelTask

    @Deprecated
    public class CancelTaskImpl
    extends Object
    implements CancelTask
    Deprecated.
    will move or be private in ver6
    Default implementation of CancelTask, used in order to get status return.
    Since:
    4/10/13
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean cancel
      Deprecated.
       
      protected boolean done
      Deprecated.
       
      protected String error
      Deprecated.
       
      protected String note
      Deprecated.
       
      protected int progress
      Deprecated.
       
      protected boolean success
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      CancelTaskImpl()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void cancel()
      Deprecated.
      Application will call this when the user cancels.
      String getErrorMessage()
      Deprecated.
      Application call this to get the error message, if any.
      int getProgress()
      Deprecated.
      Application call this to get the progress count, if any.
      String getProgressMessage()
      Deprecated.
      Application call this to get the progress message, if any.
      boolean isCancel()
      Deprecated.
      Calling routine may cancel, called routine checks this method, and if true, return asap.
      boolean isDone()
      Deprecated.
      Application calls to see if task is done.
      boolean isError()
      Deprecated.
      Application call this to find out if there was an error.
      boolean isSuccess()
      Deprecated.
      Application calls to see if task is success.
      void setDone​(boolean done)
      Deprecated.
      Called routine sets operation was completed.
      void setError​(String error)
      Deprecated.
      Called routine got an error, so it sets a message for calling program to show to user.
      void setProgress​(String msg, int progress)
      Deprecated.
      Called routine may optionally show a progress message for calling program to show to user.
      void setSuccess()
      Deprecated.
      Called routine sets whether operation successfully completed.
      String toString()
      Deprecated.
       
    • Field Detail

      • done

        protected boolean done
        Deprecated.
      • success

        protected boolean success
        Deprecated.
      • cancel

        protected boolean cancel
        Deprecated.
      • error

        protected String error
        Deprecated.
      • note

        protected String note
        Deprecated.
      • progress

        protected int progress
        Deprecated.
    • Constructor Detail

      • CancelTaskImpl

        public CancelTaskImpl()
        Deprecated.
    • Method Detail

      • isSuccess

        public boolean isSuccess()
        Deprecated.
        Application calls to see if task is success.
      • isError

        public boolean isError()
        Deprecated.
        Application call this to find out if there was an error.
      • getErrorMessage

        public String getErrorMessage()
        Deprecated.
        Application call this to get the error message, if any.
      • cancel

        public void cancel()
        Deprecated.
        Application will call this when the user cancels.
      • getProgressMessage

        public String getProgressMessage()
        Deprecated.
        Application call this to get the progress message, if any.
      • getProgress

        public int getProgress()
        Deprecated.
        Application call this to get the progress count, if any.
      • isDone

        public boolean isDone()
        Deprecated.
        Description copied from interface: CancelTask
        Application calls to see if task is done.
        Specified by:
        isDone in interface CancelTask
      • setDone

        public void setDone​(boolean done)
        Deprecated.
        Description copied from interface: CancelTask
        Called routine sets operation was completed.
        Specified by:
        setDone in interface CancelTask
      • isCancel

        public boolean isCancel()
        Deprecated.
        Description copied from interface: CancelTask
        Calling routine may cancel, called routine checks this method, and if true, return asap.
        Specified by:
        isCancel in interface CancelTask
        Returns:
        true if task was cancelled
      • setSuccess

        public void setSuccess()
        Deprecated.
        Description copied from interface: CancelTask
        Called routine sets whether operation successfully completed.
        Specified by:
        setSuccess in interface CancelTask
      • setError

        public void setError​(String error)
        Deprecated.
        Description copied from interface: CancelTask
        Called routine got an error, so it sets a message for calling program to show to user.
        Specified by:
        setError in interface CancelTask
        Parameters:
        error - message to show user
      • setProgress

        public void setProgress​(String msg,
                                int progress)
        Deprecated.
        Description copied from interface: CancelTask
        Called routine may optionally show a progress message for calling program to show to user.
        Specified by:
        setProgress in interface CancelTask
        Parameters:
        msg - message to show user
        progress - count of progress