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 Job
timeout
- ServerError
public JobParams params(Ice.Current __current) throws ServerError
_InteractiveProcessorOperations
params
in interface _InteractiveProcessorOperations
__current
- The Current object for the invocation.ServerError
public ProcessPrx execute(RMap inputs, Ice.Current __current) throws ServerError
_InteractiveProcessorOperations
execute
in interface _InteractiveProcessorOperations
__current
- The Current object for the invocation.ServerError
public RMap getResults(ProcessPrx proc, Ice.Current __current) throws ServerError
_InteractiveProcessorOperations
getResults
in interface _InteractiveProcessorOperations
__current
- The Current object for the invocation.ServerError
public long expires(Ice.Current __current)
_InteractiveProcessorOperations
expires
in interface _InteractiveProcessorOperations
__current
- The Current object for the invocation.public Job getJob(Ice.Current __current)
_InteractiveProcessorOperations
getJob
in interface _InteractiveProcessorOperations
__current
- The Current object for the invocation.public boolean setDetach(boolean detach, Ice.Current __current)
_InteractiveProcessorOperations
Process
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.ServerError
protected void doStop() throws ServerError
ServerError
public void close(Ice.Current current) throws java.lang.Exception
close
in interface CloseableServant
java.lang.Exception