org.xwiki.job
Interface Job

All Known Implementing Classes:
AbstractJob

@Role
public interface Job

A Job produced from a Request and exposing a JobStatus.

Since:
4.0M1
Version:
$Id: e28f241b9265681d0c207098cf16a4b1f85aa37b $

Method Summary
 Request getRequest()
           
 JobStatus getStatus()
           
 String getType()
           
 void join()
          Causes the current thread to wait until this job has FINSHED state.
 boolean join(long time, TimeUnit unit)
          Causes the current thread to wait until this job has FINSHED state.
 void start(Request request)
           
 

Method Detail

getType

String getType()
Returns:
the type of the job

getStatus

JobStatus getStatus()
Returns:
the status of the job

getRequest

Request getRequest()
Returns:
the job request

start

void start(Request request)
Parameters:
request - start the job with provided request

join

void join()
          throws InterruptedException
Causes the current thread to wait until this job has FINSHED state.

Throws:
InterruptedException - if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

join

boolean join(long time,
             TimeUnit unit)
             throws InterruptedException
Causes the current thread to wait until this job has FINSHED state.

Parameters:
time - the maximum time to wait
unit - the time unit of the time argument
Returns:
false if the waiting time detectably elapsed before return from the method, else true
Throws:
InterruptedException - if the current thread is interrupted (and interruption of thread suspension is supported)


Copyright © 2004-2012 XWiki. All Rights Reserved.