Interface JobRunner<T extends Job>

    • Method Detail

      • addJobCompleteListener

        void addJobCompleteListener​(JobCompleteListener l)
        Adds the listener.
        l - the listener to add
      • removeJobCompleteListener

        void removeJobCompleteListener​(JobCompleteListener l)
        Removes the listener.
        l - the listener to remove
      • clear

        void clear()
        Clears all jobs.
      • add

        void add​(T job)
        Adds the job to the execution queue.
        job - the job to add
      • add

        void add​(JobList<T> jobs)
        Adds the jobs to the execution queue.
        jobs - the jobs to add
      • getJobs

        List<T> getJobs()
        Returns the list of queued jobs.
        the jobs
      • start

        void start()
        Starts the execution of jobs.
      • stop

        void stop()
        Stops the execution after all currently queued jobs have been executed.
      • terminate

        void terminate()
        Stops the execution immediately. Waits for the jobs to finish.
      • terminate

        void terminate​(boolean wait)
        Stops the execution immediately.
        wait - whether to wait for the jobs to finish
      • complete

        void complete​(T j,
                      JobResult jr)
        Job is complete, so check for more to add..
        j - job
        jr - job result
      • isRunning

        boolean isRunning()
        Returns whether the job are being executed.
        true if jobs are being executed
      • pauseExecution

        void pauseExecution()
        Pauses the execution.
        Specified by:
        pauseExecution in interface Pausable
      • isPaused

        boolean isPaused()
        Returns whether the object is currently paused.
        Specified by:
        isPaused in interface Pausable
        true if object is paused
      • resumeExecution

        void resumeExecution()
        Resumes the execution.
        Specified by:
        resumeExecution in interface Pausable
      • setFlowContext

        void setFlowContext​(Actor value)
        Sets the flow context, if any.
        value - the context
      • getFlowContext

        Actor getFlowContext()
        Return the flow context, if any.
        the context, null if none available