Class JobMonitor

    • Field Detail

      • jobManager

        public final org.apache.sling.event.jobs.JobManager jobManager
      • resolver

        public final org.apache.sling.api.resource.ResourceResolver resolver
      • jobId

        public final String jobId
      • isActive

        protected Boolean isActive
      • wasActive

        protected Boolean wasActive
      • currentState

        protected org.apache.sling.event.jobs.Job.JobState currentState
      • finalState

        protected org.apache.sling.event.jobs.Job.JobState finalState
      • running

        protected boolean running
      • done

        protected boolean done
      • timeout

        protected long timeout
    • Constructor Detail

      • JobMonitor

        protected JobMonitor​(org.apache.sling.event.jobs.JobManager jobManager,
                             org.apache.sling.api.resource.ResourceResolver resolver,
                             String jobId,
                             Long timeout)
    • Method Detail

      • started

        public boolean started()
      • succeeded

        public boolean succeeded()
      • stopped

        public boolean stopped()
      • error

        public boolean error()
      • done

        public boolean done()
      • goalReached

        protected abstract boolean goalReached()
      • getJob

        @Nullable
        public @Nullable JobFacade getJob()
      • checkJobState

        protected void checkJobState()