|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JobHandle
Allows submission of asynchronous jobs.
NOTE: The calling order for the service is as follows:
Job
) or attach(long)close()
does not cancel or otherwise change the Job
state. See cancelJob()
.
Field Summary | |
---|---|
static String |
CANCELLED
|
static String |
ERROR
|
static String |
FINISHED
|
static String |
QUEUED
|
static String |
REQUEUED
|
static String |
RESUBMITTED
|
static String |
RUNNING
|
static String |
SUBMITTED
|
static String |
WAITING
|
Method Summary | |
---|---|
ome.model.jobs.JobStatus |
attach(long jobId)
|
void |
cancelJob()
Marks a job for cancellation. |
ome.model.jobs.Job |
getJob()
|
boolean |
jobError()
Returns true if the Job has thrown an error. |
Timestamp |
jobFinished()
|
String |
jobMessage()
|
boolean |
jobRunning()
Returns true if the Job is running, i.e. has an attached
Process . |
ome.model.jobs.JobStatus |
jobStatus()
|
long |
submit(ome.model.jobs.Job job)
Submits a Job and returns its database id. |
Methods inherited from interface ome.api.StatefulServiceInterface |
---|
activate, close, getCurrentEventContext, passivate |
Field Detail |
---|
static final String SUBMITTED
static final String RESUBMITTED
static final String QUEUED
static final String REQUEUED
static final String RUNNING
static final String ERROR
static final String WAITING
static final String FINISHED
static final String CANCELLED
Method Detail |
---|
long submit(ome.model.jobs.Job job)
Job
and returns its database id. The only fields
directly on status which are editable are message,
scheduledFor and status. The latter two must be
sensible.
job
- Not null
ome.model.jobs.JobStatus attach(long jobId) throws ome.conditions.ApiUsageException
JobStatus
for the id
ome.conditions.ApiUsageException
- if the id
does not exist.ome.model.jobs.Job getJob()
Job
ome.model.jobs.JobStatus jobStatus()
JobStatus
. Will never return null.Timestamp jobFinished()
Job
is not finished, otherwise the
Timestamp
for when it completed.String jobMessage()
boolean jobRunning()
Job
is running, i.e. has an attached
Process
.
boolean jobError()
Job
has thrown an error.
void cancelJob()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.