|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.job.internal.DefaultJobManager
@Component @Singleton public class DefaultJobManager
Default implementation of JobManager
.
Constructor Summary | |
---|---|
DefaultJobManager()
|
Method Summary | |
---|---|
Job |
addJob(String jobType,
Request request)
Add a new job in the queue of jobs to execute. |
Job |
executeJob(String jobType,
Request request)
Start a new job with the provided identifier and wait until its finished. |
Job |
getCurrentJob()
|
JobStatus |
getJobStatus(List<String> id)
Return job status corresponding to the provided id from the current executed job or stored history. |
JobStatus |
getJobStatus(String id)
Return job status corresponding to the provided id from the current executed job or stored history. |
void |
initialize()
Method called by the Component Manager when the component is created for the first time (i.e. |
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJobManager()
Method Detail |
---|
public void initialize() throws InitializationException
Initializable
initialize
in interface Initializable
InitializationException
- if an error happens during a component's initializationpublic void run()
run
in interface Runnable
public Job getCurrentJob()
getCurrentJob
in interface JobManager
public Job executeJob(String jobType, Request request) throws JobException
JobManager
executeJob
in interface JobManager
jobType
- the role hint of the job componentrequest
- the request
JobException
- error when creating the jobpublic Job addJob(String jobType, Request request) throws JobException
JobManager
addJob
in interface JobManager
jobType
- the role hint of the job componentrequest
- the request
JobException
- error when creating the jobpublic JobStatus getJobStatus(String id)
JobManager
getJobStatus
in interface JobManager
id
- the id of the job
public JobStatus getJobStatus(List<String> id)
JobManager
getJobStatus
in interface JobManager
id
- the id of the job
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |