R - the request type associated to the jobpublic abstract class AbstractJobStatus<R extends Request> extends Object implements JobStatus
JobStatus.JobStatus.State| Constructor and Description |
|---|
AbstractJobStatus(R request,
JobStatus parentJobStatus,
org.xwiki.observation.ObservationManager observationManager,
LoggerManager loggerManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
answered()
Indicate that the question has been answered.
|
void |
ask(Object question) |
Date |
getEndDate() |
LogQueue |
getLog() |
List<LogEvent> |
getLog(LogLevel level)
Deprecated.
|
JobStatus |
getParentJobStatus() |
JobProgress |
getProgress() |
Object |
getQuestion() |
R |
getRequest() |
Date |
getStartDate() |
JobStatus.State |
getState() |
boolean |
isIsolated() |
boolean |
isSubJob() |
void |
setEndDate(Date endDate) |
void |
setIsolated(boolean isolated) |
void |
setStartDate(Date startDate) |
void |
setState(JobStatus.State state) |
void |
startListening()
Start listening to events.
|
void |
stopListening()
Stop listening to events.
|
public AbstractJobStatus(R request, JobStatus parentJobStatus, org.xwiki.observation.ObservationManager observationManager, LoggerManager loggerManager)
request - the request provided when started the jobparentJobStatus - the status of the parent job (i.e. the status of the job that started this one); pass
null if this job hasn't been started by another job (i.e. if this is not a sub-job)observationManager - the observation manager componentloggerManager - the logger manager componentpublic void startListening()
public void stopListening()
public JobStatus.State getState()
public void setState(JobStatus.State state)
state - the general state of the jobpublic R getRequest()
getRequest in interface JobStatuspublic LogQueue getLog()
public JobProgress getProgress()
getProgress in interface JobStatuspublic void ask(Object question) throws InterruptedException
ask in interface JobStatusquestion - the question to ask as a Java beanInterruptedException - if the current thread is interruptedpublic Object getQuestion()
getQuestion in interface JobStatuspublic void answered()
JobStatuspublic Date getStartDate()
getStartDate in interface JobStatuspublic void setStartDate(Date startDate)
startDate - the date and time when the job has been startedpublic Date getEndDate()
getEndDate in interface JobStatuspublic void setEndDate(Date endDate)
endDate - the date and time when the job finishedpublic boolean isSubJob()
public boolean isIsolated()
public void setIsolated(boolean isolated)
isolated - true if the job log should be grabbedpublic JobStatus getParentJobStatus()
null if
the job has no parent, i.e. if the job hasn't been started by another jobCopyright © 2004–2017 XWiki. All rights reserved.