org.xwiki.job.event.status
Interface JobStatus

All Known Subinterfaces:
ExtensionPlan
All Known Implementing Classes:
AbstractJobStatus, DefaultExtensionPlan, DefaultJobStatus, DistributionJobStatus, SafeExtensionPlan, SafeJobStatus

public interface JobStatus

Describe the current status of a job.

Since:
4.0M1

Nested Class Summary
static class JobStatus.State
          Job status.
 
Method Summary
 void answered()
          Indicate that the question has been answered.
 void ask(Object question)
           
 Date getEndDate()
           
 LogQueue getLog()
           
 List<LogEvent> getLog(LogLevel level)
          Deprecated. since 4.1RC1 use LogQueue.getLogs(LogLevel) instead
 JobProgress getProgress()
           
 Object getQuestion()
           
 Request getRequest()
           
 Date getStartDate()
           
 JobStatus.State getState()
           
 

Method Detail

getState

JobStatus.State getState()
Returns:
the general state of the job

getRequest

Request getRequest()
Returns:
the job request provided when starting it

getLog

LogQueue getLog()
Returns:
the log sent during job execution

getProgress

JobProgress getProgress()
Returns:
progress information about the job (percent, etc.)

ask

void ask(Object question)
         throws InterruptedException
Parameters:
question - the question to ask as a Java bean
Throws:
InterruptedException - if the current thread is interrupted
Since:
4.0M2

getQuestion

Object getQuestion()
Returns:
the question
Since:
4.0M2

answered

void answered()
Indicate that the question has been answered.

Since:
4.0M2

getStartDate

Date getStartDate()
Returns:
the date and time when the job has been started

getEndDate

Date getEndDate()
Returns:
the date and time when the job finished

getLog

@Deprecated
List<LogEvent> getLog(LogLevel level)
Deprecated. since 4.1RC1 use LogQueue.getLogs(LogLevel) instead

Parameters:
level - the level of the log
Returns:
the log sent with the provided level