Blue Mind
Release 1.0

net.bluemind.core.client.job
Class JobClient

java.lang.Object
  extended by net.bluemind.core.client.impl.AbstractClientImpl
      extended by net.bluemind.core.client.job.JobClient
All Implemented Interfaces:
IJob, ISyncClient

public class JobClient
extends AbstractClientImpl
implements IJob


Field Summary
 
Fields inherited from class net.bluemind.core.client.impl.AbstractClientImpl
logger
 
Constructor Summary
JobClient(java.lang.String coreUrl)
           
 
Method Summary
 void deleteExecution(AccessToken at, JobExecution je)
          Removes one execution.
 ResultList<JobExecution> findExecutions(AccessToken at, JobExecutionQuery jeq)
          Fetch recorded executions of a job.
 ResultList<Job> findJobs(AccessToken at, JobQuery jq)
          List jobs deployed. global & non-global admins will get different results.
 ResultList<JobExecution> getActiveJob(AccessToken at, java.lang.String jid)
          Get active job using it's ID
 ResultList<JobExecution> getActiveJobs(AccessToken at, Domain d)
          Returning in-progress job executions, not yet recorded to database
 Job getJobFromId(AccessToken at, java.lang.String jobId)
           
 java.util.Map<java.lang.String,java.util.List<LogEntry>> getLocalizedLogs(AccessToken at, JobExecution je)
          Fetch the logs for a job execution.
 AccessToken login(java.lang.String login, java.lang.String password, java.lang.String origin)
           
 void logout(AccessToken at)
           
 void start(AccessToken at, java.lang.String jobId)
          force-start a job.
 void updateJob(AccessToken at, Job job)
          Update the JobPlanification of the job
 
Methods inherited from class net.bluemind.core.client.impl.AbstractClientImpl
checkServerError, execute, executeStream, executeVoid, initParams, setToken, sudo, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobClient

public JobClient(java.lang.String coreUrl)
Method Detail

findJobs

public ResultList<Job> findJobs(AccessToken at,
                                JobQuery jq)
                         throws ServerFault,
                                AuthFault
Description copied from interface: IJob
List jobs deployed. global & non-global admins will get different results.

Specified by:
findJobs in interface IJob
Returns:
Throws:
ServerFault
AuthFault

login

public AccessToken login(java.lang.String login,
                         java.lang.String password,
                         java.lang.String origin)
Specified by:
login in interface ISyncClient
Overrides:
login in class AbstractClientImpl

logout

public void logout(AccessToken at)
Specified by:
logout in interface ISyncClient
Overrides:
logout in class AbstractClientImpl

start

public void start(AccessToken at,
                  java.lang.String jobId)
           throws ServerFault,
                  AuthFault
Description copied from interface: IJob
force-start a job. Execution is recorded when the job finishes.

Specified by:
start in interface IJob
Throws:
ServerFault
AuthFault

findExecutions

public ResultList<JobExecution> findExecutions(AccessToken at,
                                               JobExecutionQuery jeq)
                                        throws ServerFault,
                                               AuthFault
Description copied from interface: IJob
Fetch recorded executions of a job. Pagination is supported. global & non-global admins will get different results.

Specified by:
findExecutions in interface IJob
Returns:
Throws:
ServerFault
AuthFault

getLocalizedLogs

public java.util.Map<java.lang.String,java.util.List<LogEntry>> getLocalizedLogs(AccessToken at,
                                                                                 JobExecution je)
                                                                          throws ServerFault,
                                                                                 AuthFault
Description copied from interface: IJob
Fetch the logs for a job execution. Keys are 2-letters locale (eg. fr, en).

Specified by:
getLocalizedLogs in interface IJob
Returns:
Throws:
ServerFault
AuthFault

getJobFromId

public Job getJobFromId(AccessToken at,
                        java.lang.String jobId)
                 throws ServerFault,
                        AuthFault
Specified by:
getJobFromId in interface IJob
Throws:
ServerFault
AuthFault

updateJob

public void updateJob(AccessToken at,
                      Job job)
               throws ServerFault,
                      AuthFault
Description copied from interface: IJob
Update the JobPlanification of the job

Specified by:
updateJob in interface IJob
Throws:
ServerFault
AuthFault

deleteExecution

public void deleteExecution(AccessToken at,
                            JobExecution je)
                     throws ServerFault,
                            AuthFault
Description copied from interface: IJob
Removes one execution. Removes nothing if your token has no right on this execution (global job, different domain, etc)

Specified by:
deleteExecution in interface IJob
Throws:
ServerFault
AuthFault

getActiveJobs

public ResultList<JobExecution> getActiveJobs(AccessToken at,
                                              Domain d)
                                       throws ServerFault
Description copied from interface: IJob
Returning in-progress job executions, not yet recorded to database

Specified by:
getActiveJobs in interface IJob
Returns:
Throws:
ServerFault

getActiveJob

public ResultList<JobExecution> getActiveJob(AccessToken at,
                                             java.lang.String jid)
                                      throws ServerFault,
                                             AuthFault
Description copied from interface: IJob
Get active job using it's ID

Specified by:
getActiveJob in interface IJob
Returns:
Throws:
ServerFault
AuthFault

Blue Mind
Release 1.0