public class ScriptProcessI extends AbstractAmdServant implements _ScriptProcessOperations
Constructor and Description |
---|
ScriptProcessI(ServiceFactoryI sf,
Ice.Current current,
InteractiveProcessorPrx processorPrx,
_InteractiveProcessorOperations processor,
ProcessPrx process) |
Modifier and Type | Method and Description |
---|---|
int |
_wait(Ice.Current __current)
Blocks until poll() would return a non-null return code.
|
boolean |
cancel(Ice.Current __current)
Signal to the Process that it should terminate.
|
void |
close(boolean detach,
Ice.Current __current)
Closes this process and frees server resources attached to it.
|
ScriptJob |
getJob(Ice.Current __current)
Returns the job which started this process.
|
ScriptProcessPrx |
getProxy() |
java.util.Map<java.lang.String,RType> |
getResults(int waitSecs,
Ice.Current __current)
Returns the results immediately if present.
|
boolean |
kill(Ice.Current __current)
Terminate the Process immediately.
|
RInt |
poll(Ice.Current __current)
Returns the return code of the process, or null
if unfinished.
|
void |
registerCallback(ProcessCallbackPrx cb,
Ice.Current __current)
Add a callback for end-of-life events
|
java.lang.String |
setMessage(java.lang.String message,
Ice.Current __current)
Sets the message on the
ScriptJob object. |
void |
shutdown(Ice.Current __current)
First attempts cancel() several times and finally
resorts to kill to force the process to shutdown
cleanly.
|
void |
unregisterCallback(ProcessCallbackPrx cb,
Ice.Current __current)
Remove a callback for end-of-life events
|
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
public ScriptProcessI(ServiceFactoryI sf, Ice.Current current, InteractiveProcessorPrx processorPrx, _InteractiveProcessorOperations processor, ProcessPrx process) throws ServerError
ServerError
public ScriptProcessPrx getProxy()
public void close(boolean detach, Ice.Current __current) throws ServerError
_ScriptProcessOperations
IScript
service.
If the detach argument is False, then the background process
will be shutdown immediately, and all intermediate results
(stdout, stderr, ...) will be uploaded.close
in interface _ScriptProcessOperations
__current
- The Current object for the invocation.ServerError
public ScriptJob getJob(Ice.Current __current) throws ServerError
_ScriptProcessOperations
getJob
in interface _ScriptProcessOperations
__current
- The Current object for the invocation.ServerError
public java.util.Map<java.lang.String,RType> getResults(int waitSecs, Ice.Current __current) throws ServerError
_ScriptProcessOperations
ApiUsageException
. If poll has returned a non-null
value, then this method will always return a non-null value.getResults
in interface _ScriptProcessOperations
__current
- The Current object for the invocation.ServerError
public java.lang.String setMessage(java.lang.String message, Ice.Current __current) throws ServerError
_ScriptProcessOperations
ScriptJob
object.
This value MAY be overwritten by the server if the script
fails.setMessage
in interface _ScriptProcessOperations
__current
- The Current object for the invocation.ServerError
public int _wait(Ice.Current __current) throws ServerError
_ProcessOperations
_wait
in interface _ProcessOperations
__current
- The Current object for the invocation.ServerError
public boolean cancel(Ice.Current __current) throws ServerError
_ProcessOperations
cancel
in interface _ProcessOperations
__current
- The Current object for the invocation.ServerError
public boolean kill(Ice.Current __current)
_ProcessOperations
kill
in interface _ProcessOperations
__current
- The Current object for the invocation.public RInt poll(Ice.Current __current) throws ServerError
_ProcessOperations
poll
in interface _ProcessOperations
__current
- The Current object for the invocation.ServerError
public void registerCallback(ProcessCallbackPrx cb, Ice.Current __current) throws ServerError
_ProcessOperations
registerCallback
in interface _ProcessOperations
__current
- The Current object for the invocation.ServerError
public void shutdown(Ice.Current __current)
_ProcessOperations
shutdown
in interface _ProcessOperations
__current
- The Current object for the invocation.public void unregisterCallback(ProcessCallbackPrx cb, Ice.Current __current) throws ServerError
_ProcessOperations
unregisterCallback
in interface _ProcessOperations
__current
- The Current object for the invocation.ServerError