Class BackgroundTaskImpl

    • Method Detail

      • getId

        public String getId()
        Description copied from interface: BackgroundTask
        Task identifier, which was used when task were created
        Specified by:
        getId in interface BackgroundTask
        Returns:
        see above
      • getProgressText

        public String getProgressText()
        Description copied from interface: BackgroundTask
        Get current progress text, which was set by ActivityProgress#setProgressText
        Specified by:
        getProgressText in interface BackgroundTask
        Returns:
        see above
      • getFraction

        public float getFraction()
        Specified by:
        getFraction in interface BackgroundTask
        Returns:
        completion percentage, see ActivityProgress#setFraction
      • getFuture

        public Future getFuture()
        Specified by:
        getFuture in interface BackgroundTask
        Returns:
        future object, associated with the given task
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface BackgroundTask
        Returns:
        true if task has finished or canceled
      • setFraction

        public void setFraction​(float completed)
        Description copied from interface: ActivityProgress
        Allows to set the completion of the task (should be between 0 and 1 inclusive)
        Specified by:
        setFraction in interface ActivityProgress
        Parameters:
        completed - number 0..1 to specify completed percent
      • setProgressText

        public void setProgressText​(String progressText)
        Description copied from interface: ActivityProgress
        Set current progress text
        Specified by:
        setProgressText in interface ActivityProgress
        Parameters:
        progressText - short description of the current operation