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 voidattach_async(AMD_JobHandle_attach __cb, long jobId, Ice.Current __current)Returns the currentJobStatusfor the Job id.voidcancelJob_async(AMD_JobHandle_cancelJob __cb, Ice.Current __current)Marks a job for cancellation.voidgetJob_async(AMD_JobHandle_getJob __cb, Ice.Current __current)Returns the currentJobvoidjobError_async(AMD_JobHandle_jobError __cb, Ice.Current __current)Returnstrueif theJobhas thrown an error.voidjobFinished_async(AMD_JobHandle_jobFinished __cb, Ice.Current __current)voidjobMessage_async(AMD_JobHandle_jobMessage __cb, Ice.Current __current)Returns the current message for job.voidjobRunning_async(AMD_JobHandle_jobRunning __cb, Ice.Current __current)Returnstrueif theJobis running, i.e.voidjobStatus_async(AMD_JobHandle_jobStatus __cb, Ice.Current __current)Returns the currentJobStatus.protected voidpostClose(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 voidpreClose(Ice.Current current)voidsetMessage_async(AMD_JobHandle_setMessage __cb, java.lang.String message, Ice.Current __current)Sets the job's message string, and returns the previous value.voidsetStatus_async(AMD_JobHandle_setStatus __cb, java.lang.String status, Ice.Current __current)Updates theJobStatusfor the current job.voidsetStatusAndMessage_async(AMD_JobHandle_setStatusAndMessage __cb, java.lang.String status, RString msg, Ice.Current __current)LikesetStatusbut also sets the message.voidsubmit_async(AMD_JobHandle_submit __cb, Job j, Ice.Current __current)Submits aJoband 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:_JobHandleOperationsReturns the currentJobStatusfor the Job id.- Specified by:
attach_asyncin 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:_JobHandleOperationsMarks 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_asyncin 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:_JobHandleOperationsReturns the currentJob- Specified by:
getJob_asyncin 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:_JobHandleOperationsReturnstrueif theJobhas thrown an error.- Specified by:
jobError_asyncin 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_asyncin 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:_JobHandleOperationsReturns the current message for job. May be set during processing.- Specified by:
jobMessage_asyncin 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:_JobHandleOperationsReturnstrueif theJobis running, i.e. has an attached process.- Specified by:
jobRunning_asyncin 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:_JobHandleOperationsReturns the currentJobStatus. Will never return null.- Specified by:
jobStatus_asyncin 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:_JobHandleOperationsSubmits aJoband 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_asyncin 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:_JobHandleOperationsUpdates theJobStatusfor the current job. The previous status is returned as a string. If the status isCANCELLED, this method is equivalent tocancelJob.- Specified by:
setStatus_asyncin 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:_JobHandleOperationsLikesetStatusbut also sets the message.- Specified by:
setStatusAndMessage_asyncin 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:_JobHandleOperationsSets the job's message string, and returns the previous value.- Specified by:
setMessage_asyncin 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:
preClosein classAbstractCloseableAmdServant- Throws:
java.lang.Throwable
-
postClose
protected void postClose(Ice.Current current)
Description copied from class:AbstractCloseableAmdServantShould 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:
postClosein classAbstractCloseableAmdServant
-
-