Package omero.grid
Interface _ProcessOperationsNC
-
- All Known Subinterfaces:
_ScriptProcessOperationsNC
,Process
,ScriptProcess
- All Known Implementing Classes:
_ProcessDisp
,_ProcessTie
,_ScriptProcessDisp
,_ScriptProcessTie
public interface _ProcessOperationsNC
Thin 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.boolean
cancel()
Signal to the Process that it should terminate.boolean
kill()
Terminate the Process immediately.RInt
poll()
Returns the return code of the process, or null if unfinished.void
registerCallback(ProcessCallbackPrx cb)
Add a callback for end-of-life eventsvoid
shutdown()
First attempts cancel() several times and finally resorts to kill to force the process to shutdown cleanly.void
unregisterCallback(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 ServerError
Signal 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
-
-