bobik
Interface Job

All Superinterfaces:
java.util.concurrent.Future<JSONObject>

public interface Job
extends java.util.concurrent.Future<JSONObject>

Provides tracking and control capabilities for Bobik jobs. Refrain from using this class unless you want direct control over monitoring the job's progress, waiting or aborting it. Most calls results in http calls to Bobik. At the same time, there is an asynchronous monitor working that will call your JobListener. Though implemented similarly, that callback is made in accordance with estimated job completion time and is generally better optimized for user experience..


Method Summary
 float getProgress()
          Returns a value between 0 and 1 indicating the progress made on this job.
 java.lang.String id()
           
 void waitForCompletion()
          Blocks until this job completes
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

getProgress

float getProgress()
                  throws BobikException
Returns a value between 0 and 1 indicating the progress made on this job.

Returns:
progress
Throws:
BobikException

id

java.lang.String id()
Returns:
job_id

waitForCompletion

void waitForCompletion()
                       throws BobikException
Blocks until this job completes

Throws:
BobikException