Package omero.api
Interface _JobHandleOperationsNC
-
- All Superinterfaces:
_ServiceInterfaceOperationsNC
,_StatefulServiceInterfaceOperationsNC
- All Known Subinterfaces:
JobHandle
- All Known Implementing Classes:
_JobHandleDisp
,_JobHandleTie
public interface _JobHandleOperationsNC extends _StatefulServiceInterfaceOperationsNC
Allows submission of asynchronous jobs.NOTE: The calling order for the service is as follows:
submit
orattach
- any of the other methods
close
close
does not cancel or otherwise change the Job state. SeecancelJob
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
attach_async(AMD_JobHandle_attach __cb, long jobId)
Returns the currentJobStatus
for the Job id.void
cancelJob_async(AMD_JobHandle_cancelJob __cb)
Marks a job for cancellation.void
getJob_async(AMD_JobHandle_getJob __cb)
Returns the currentJob
void
jobError_async(AMD_JobHandle_jobError __cb)
Returnstrue
if theJob
has thrown an error.void
jobFinished_async(AMD_JobHandle_jobFinished __cb)
void
jobMessage_async(AMD_JobHandle_jobMessage __cb)
Returns the current message for job.void
jobRunning_async(AMD_JobHandle_jobRunning __cb)
Returnstrue
if theJob
is running, i.e.void
jobStatus_async(AMD_JobHandle_jobStatus __cb)
Returns the currentJobStatus
.void
setMessage_async(AMD_JobHandle_setMessage __cb, java.lang.String message)
Sets the job's message string, and returns the previous value.void
setStatus_async(AMD_JobHandle_setStatus __cb, java.lang.String status)
Updates theJobStatus
for the current job.void
setStatusAndMessage_async(AMD_JobHandle_setStatusAndMessage __cb, java.lang.String status, RString message)
LikesetStatus
but also sets the message.void
submit_async(AMD_JobHandle_submit __cb, Job job)
Submits aJob
and returns its database id.-
Methods inherited from interface omero.api._StatefulServiceInterfaceOperationsNC
activate_async, close_async, getCurrentEventContext_async, passivate_async
-
-
-
-
Method Detail
-
submit_async
void submit_async(AMD_JobHandle_submit __cb, Job job) throws ServerError
Submits aJob
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.- Parameters:
__cb
- The callback object for the operation.job
- Not null- Throws:
ServerError
-
attach_async
void attach_async(AMD_JobHandle_attach __cb, long jobId) throws ServerError
Returns the currentJobStatus
for the Job id.- Parameters:
__cb
- The callback object for the operation.- Throws:
ApiUsageException
- if theJob
does not exist.ServerError
-
getJob_async
void getJob_async(AMD_JobHandle_getJob __cb) throws ServerError
Returns the currentJob
- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
jobStatus_async
void jobStatus_async(AMD_JobHandle_jobStatus __cb) throws ServerError
Returns the currentJobStatus
. Will never return null.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
jobFinished_async
void jobFinished_async(AMD_JobHandle_jobFinished __cb) throws ServerError
- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
jobMessage_async
void jobMessage_async(AMD_JobHandle_jobMessage __cb) throws ServerError
Returns the current message for job. May be set during processing.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
jobRunning_async
void jobRunning_async(AMD_JobHandle_jobRunning __cb) throws ServerError
Returnstrue
if theJob
is running, i.e. has an attached process.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
jobError_async
void jobError_async(AMD_JobHandle_jobError __cb) throws ServerError
Returnstrue
if theJob
has thrown an error.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
cancelJob_async
void cancelJob_async(AMD_JobHandle_cancelJob __cb) throws ServerError
Marks a job for cancellation. Not every processor will check for the cancelled flag for a running job, but no non-running job will start if it has been cancelled.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
setStatus_async
void setStatus_async(AMD_JobHandle_setStatus __cb, java.lang.String status) throws ServerError
Updates theJobStatus
for the current job. The previous status is returned as a string. If the status isCANCELLED
, this method is equivalent tocancelJob
.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
setMessage_async
void setMessage_async(AMD_JobHandle_setMessage __cb, java.lang.String message) throws ServerError
Sets the job's message string, and returns the previous value.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
setStatusAndMessage_async
void setStatusAndMessage_async(AMD_JobHandle_setStatusAndMessage __cb, java.lang.String status, RString message) throws ServerError
LikesetStatus
but also sets the message.- Parameters:
__cb
- The callback object for the operation.- Throws:
ServerError
-
-