org.xwiki.job
Interface JobManager


@Role
public interface JobManager

Proxy used to simplify execution of jobs.

Since:
4.0M1
Version:
$Id$

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.
 Job getCurrentJob()
           
 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

executeJob

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

Parameters:
jobType - the role hint of the job component
request - the request
Returns:
the created job
Throws:
JobException - error when trying to run 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 trying to run the job


Copyright © 2004-2012 XWiki. All Rights Reserved.