Package ome.services.blitz.impl
Class JobHandleI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.AbstractCloseableAmdServant
-
- ome.services.blitz.impl.JobHandleI
-
- All Implemented Interfaces:
_JobHandleOperations
,_ServiceInterfaceOperations
,_StatefulServiceInterfaceOperations
,CloseableServant
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class JobHandleI extends AbstractCloseableAmdServant implements _JobHandleOperations
Implementation of the JobHandle service.- Since:
- 3.0-Beta4
- See Also:
JobHandle
-
-
Constructor Summary
Constructors Constructor Description JobHandleI(ome.api.JobHandle service, BlitzExecutor be)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach_async(AMD_JobHandle_attach __cb, long jobId, Ice.Current __current)
Returns the currentJobStatus
for the Job id.void
cancelJob_async(AMD_JobHandle_cancelJob __cb, Ice.Current __current)
Marks a job for cancellation.void
getJob_async(AMD_JobHandle_getJob __cb, Ice.Current __current)
Returns the currentJob
void
jobError_async(AMD_JobHandle_jobError __cb, Ice.Current __current)
Returnstrue
if theJob
has thrown an error.void
jobFinished_async(AMD_JobHandle_jobFinished __cb, Ice.Current __current)
void
jobMessage_async(AMD_JobHandle_jobMessage __cb, Ice.Current __current)
Returns the current message for job.void
jobRunning_async(AMD_JobHandle_jobRunning __cb, Ice.Current __current)
Returnstrue
if theJob
is running, i.e.void
jobStatus_async(AMD_JobHandle_jobStatus __cb, Ice.Current __current)
Returns the currentJobStatus
.protected void
postClose(Ice.Current current)
Should not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.protected void
preClose(Ice.Current current)
void
setMessage_async(AMD_JobHandle_setMessage __cb, java.lang.String message, Ice.Current __current)
Sets the job's message string, and returns the previous value.void
setStatus_async(AMD_JobHandle_setStatus __cb, java.lang.String status, Ice.Current __current)
Updates theJobStatus
for the current job.void
setStatusAndMessage_async(AMD_JobHandle_setStatusAndMessage __cb, java.lang.String status, RString msg, Ice.Current __current)
LikesetStatus
but also sets the message.void
submit_async(AMD_JobHandle_submit __cb, Job j, Ice.Current __current)
Submits aJob
and returns its database id.-
Methods inherited from class ome.services.blitz.impl.AbstractCloseableAmdServant
close, close_async
-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface omero.api._StatefulServiceInterfaceOperations
activate_async, close_async, getCurrentEventContext_async, passivate_async
-
-
-
-
Constructor Detail
-
JobHandleI
public JobHandleI(ome.api.JobHandle service, BlitzExecutor be)
-
-
Method Detail
-
attach_async
public void attach_async(AMD_JobHandle_attach __cb, long jobId, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returns the currentJobStatus
for the Job id.- Specified by:
attach_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
cancelJob_async
public void cancelJob_async(AMD_JobHandle_cancelJob __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
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.- Specified by:
cancelJob_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getJob_async
public void getJob_async(AMD_JobHandle_getJob __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returns the currentJob
- Specified by:
getJob_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
jobError_async
public void jobError_async(AMD_JobHandle_jobError __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returnstrue
if theJob
has thrown an error.- Specified by:
jobError_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
jobFinished_async
public void jobFinished_async(AMD_JobHandle_jobFinished __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
- Specified by:
jobFinished_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
jobMessage_async
public void jobMessage_async(AMD_JobHandle_jobMessage __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returns the current message for job. May be set during processing.- Specified by:
jobMessage_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
jobRunning_async
public void jobRunning_async(AMD_JobHandle_jobRunning __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returnstrue
if theJob
is running, i.e. has an attached process.- Specified by:
jobRunning_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
jobStatus_async
public void jobStatus_async(AMD_JobHandle_jobStatus __cb, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Returns the currentJobStatus
. Will never return null.- Specified by:
jobStatus_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
submit_async
public void submit_async(AMD_JobHandle_submit __cb, Job j, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
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.- Specified by:
submit_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.j
- Not null__current
- The Current object for the invocation.- Throws:
ServerError
-
setStatus_async
public void setStatus_async(AMD_JobHandle_setStatus __cb, java.lang.String status, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Updates theJobStatus
for the current job. The previous status is returned as a string. If the status isCANCELLED
, this method is equivalent tocancelJob
.- Specified by:
setStatus_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
setStatusAndMessage_async
public void setStatusAndMessage_async(AMD_JobHandle_setStatusAndMessage __cb, java.lang.String status, RString msg, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
LikesetStatus
but also sets the message.- Specified by:
setStatusAndMessage_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
setMessage_async
public void setMessage_async(AMD_JobHandle_setMessage __cb, java.lang.String message, Ice.Current __current) throws ServerError
Description copied from interface:_JobHandleOperations
Sets the job's message string, and returns the previous value.- Specified by:
setMessage_async
in interface_JobHandleOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
preClose
protected void preClose(Ice.Current current) throws java.lang.Throwable
- Specified by:
preClose
in classAbstractCloseableAmdServant
- Throws:
java.lang.Throwable
-
postClose
protected void postClose(Ice.Current current)
Description copied from class:AbstractCloseableAmdServant
Should not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.- Specified by:
postClose
in classAbstractCloseableAmdServant
-
-