|
||||||||||
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()
|
String |
setMessage(String message)
Sets the job's message string, and returns the previous value. |
String |
setStatus(String status)
Updates the JobStatus for the current job. |
String |
setStatusAndMessage(String status,
String message)
Like setStatus(String) but also sets the message. |
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()
String setStatus(String status)
JobStatus
for the current job. The previous status
is returned as a string. If the status is CANCELLED
, this
method is equivalent to cancelJob()
.
String setStatusAndMessage(String status, String message)
setStatus(String)
but also sets the message.
String setMessage(String message)
message
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.4-dbcbce5a-b4
Copyright © 2009 The University of Dundee. All Rights Reserved.