public class InteractiveProcessorI extends java.lang.Object implements _InteractiveProcessorOperations, CloseableServant
Processor implementation which delegates to an omero.grid.Processor
servant. Functions as a state machine. A single ProcessPrx can be
active at any given time. Once it's complete, then the results
can be obtained, then a new Job can be submitted, until stop
is set. Any other use throws an ApiUsageException.| Constructor and Description |
|---|
InteractiveProcessorI(ome.system.Principal p,
ome.services.sessions.SessionManager mgr,
ome.services.util.Executor ex,
ProcessorPrx prx,
Job job,
long timeout,
Glacier2.SessionControlPrx control,
ParamsCache paramsCache,
ParamsHelper paramsHelper,
ome.services.scripts.ScriptRepoHelper scriptRepoHelper,
Ice.Current current) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(Ice.Current current) |
protected void |
doStop() |
ProcessPrx |
execute(RMap inputs,
Ice.Current __current)
Executes an instance of the job returned by getJob() using
the given map as inputs.
|
long |
expires(Ice.Current __current)
Returns the system clock time in milliseconds since the epoch
at which this processor will be reaped.
|
Job |
getJob(Ice.Current __current)
Returns the job which defines this processor.
|
RMap |
getResults(ProcessPrx proc,
Ice.Current __current)
Retrieve the results for the given process.
|
JobParams |
params(Ice.Current __current)
Retrieves the parameters needed to be passed in an execution
and the results which will be passed back out.
|
boolean |
setDetach(boolean detach,
Ice.Current __current)
Sets whether or not cancel will be called on the current
Process on stop. |
void |
stop(Ice.Current __current)
Cancels the current process, nulls the value, and returns immediately
if detach is false.
|
public InteractiveProcessorI(ome.system.Principal p,
ome.services.sessions.SessionManager mgr,
ome.services.util.Executor ex,
ProcessorPrx prx,
Job job,
long timeout,
Glacier2.SessionControlPrx control,
ParamsCache paramsCache,
ParamsHelper paramsHelper,
ome.services.scripts.ScriptRepoHelper scriptRepoHelper,
Ice.Current current)
throws ServerError
p - mgr - prx - job - Unloaded Job instance, which will be used by
Processor to reload the Jobtimeout - ServerErrorpublic JobParams params(Ice.Current __current) throws ServerError
_InteractiveProcessorOperationsparams in interface _InteractiveProcessorOperations__current - The Current object for the invocation.ServerErrorpublic ProcessPrx execute(RMap inputs, Ice.Current __current) throws ServerError
_InteractiveProcessorOperationsexecute in interface _InteractiveProcessorOperations__current - The Current object for the invocation.ServerErrorpublic RMap getResults(ProcessPrx proc, Ice.Current __current) throws ServerError
_InteractiveProcessorOperationsgetResults in interface _InteractiveProcessorOperations__current - The Current object for the invocation.ServerErrorpublic long expires(Ice.Current __current)
_InteractiveProcessorOperationsexpires in interface _InteractiveProcessorOperations__current - The Current object for the invocation.public Job getJob(Ice.Current __current)
_InteractiveProcessorOperationsgetJob in interface _InteractiveProcessorOperations__current - The Current object for the invocation.public boolean setDetach(boolean detach,
Ice.Current __current)
_InteractiveProcessorOperationsProcess on stop. If detach is true, then the
Process will continue running. Otherwise,
_ProcessOperations.cancel(Ice.Current) will be called, before preparing for
another run.
false by defaultsetDetach in interface _InteractiveProcessorOperations__current - The Current object for the invocation.public void stop(Ice.Current __current)
throws ServerError
stop in interface _InteractiveProcessorOperations__current - The Current object for the invocation.ServerErrorprotected void doStop()
throws ServerError
ServerErrorpublic void close(Ice.Current current)
throws java.lang.Exception
close in interface CloseableServantjava.lang.Exception