Interface ProgressService


  • public interface ProgressService
    simplified version of the ScheduleService meant for one-time tasks
    Author:
    jutzig.dev@googlemail.com
    • Method Detail

      • schedule

        String schedule​(RunnableWithProgress task,
                        String description)
        use this to schedule a one-time task
        Parameters:
        task -
        Returns:
        the id of the task
      • progressionOf

        Progression progressionOf​(String id)
        retrieves a task currently executed with #schedule(RunnableWithProgress)
        Parameters:
        id -
        Returns:
        the progression of the task
        Throws:
        RuntimeException - if the progression cannot be obtained
      • cancel

        void cancel​(String id)
        attempts to cancel the task with the given id
        Parameters:
        id -
      • shutdown

        void shutdown()
        shuts the scheduler/progress service down. Tasks will no longer be executed after calling this method. The method is synchronous, so it will wait for the scheduler to be shutdown completely before returning