org.xwiki.job
Interface JobManager


@Role
public interface JobManager

Proxy used to simplify execution of jobs.

Since:
4.0M1
Version:
$Id: aa1aab7648c77e67923de27809e9b6e4d6ff74d8 $

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.
 

Method Detail

getCurrentJob

Job getCurrentJob()
Returns:
the job currently running or the latest job, null if there is no job

getJobStatus

JobStatus getJobStatus(String id)
Return job status corresponding to the provided id from the current executed job or stored history.

Parameters:
id - the id of the job
Returns:
the job status corresponding to the provided job id, null if none can be found

getJobStatus

JobStatus getJobStatus(List<String> id)
Return job status corresponding to the provided id from the current executed job or stored history.

Parameters:
id - the id of the job
Returns:
the job status corresponding to the provided job id, null if none can be found
Since:
4.1M2

executeJob

Job executeJob(String jobType,
               Request request)
               throws JobException
Start a new job with the provided identifier and wait until its finished.

Parameters:
jobType - the role hint of the job component
request - the request
Returns:
the created job
Throws:
JobException - error when creating the job

addJob

Job addJob(String jobType,
           Request request)
           throws JobException
Add a new job in the queue of jobs to execute.

Parameters:
jobType - the role hint of the job component
request - the request
Returns:
the created job
Throws:
JobException - error when creating the job


Copyright © 2004-2013 XWiki. All Rights Reserved.