Package omero.grid
Interface _ProcessOperationsNC
-
- All Known Subinterfaces:
_ScriptProcessOperationsNC,Process,ScriptProcess
- All Known Implementing Classes:
_ProcessDisp,_ProcessTie,_ScriptProcessDisp,_ScriptProcessTie
public interface _ProcessOperationsNCThin wrapper around a system-level process. Most closely resembles Python's subprocess.Popen class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int_wait()Blocks until poll() would return a non-null return code.booleancancel()Signal to the Process that it should terminate.booleankill()Terminate the Process immediately.RIntpoll()Returns the return code of the process, or null if unfinished.voidregisterCallback(ProcessCallbackPrx cb)Add a callback for end-of-life eventsvoidshutdown()First attempts cancel() several times and finally resorts to kill to force the process to shutdown cleanly.voidunregisterCallback(ProcessCallbackPrx cb)Remove a callback for end-of-life events
-
-
-
Method Detail
-
poll
RInt poll() throws ServerError
Returns the return code of the process, or null if unfinished.- Throws:
ServerError
-
_wait
int _wait() throws ServerError
Blocks until poll() would return a non-null return code.- Throws:
ServerError
-
cancel
boolean cancel() throws ServerErrorSignal to the Process that it should terminate. This may be done "softly" for a given time period.- Throws:
ServerError
-
kill
boolean kill()
Terminate the Process immediately.
-
shutdown
void shutdown()
First attempts cancel() several times and finally resorts to kill to force the process to shutdown cleanly. This method doesn't return any value or throw an exception so that it can be called oneway.
-
registerCallback
void registerCallback(ProcessCallbackPrx cb) throws ServerError
Add a callback for end-of-life events- Throws:
ServerError
-
unregisterCallback
void unregisterCallback(ProcessCallbackPrx cb) throws ServerError
Remove a callback for end-of-life events- Throws:
ServerError
-
-