Package omero.grid
Class _ScriptProcessTie
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.grid._ScriptProcessDisp
-
- omero.grid._ScriptProcessTie
-
- All Implemented Interfaces:
Ice.Object
,Ice.TieBase
,java.io.Serializable
,java.lang.Cloneable
,_ProcessOperations
,_ProcessOperationsNC
,_ScriptProcessOperations
,_ScriptProcessOperationsNC
,Process
,ScriptProcess
public class _ScriptProcessTie extends _ScriptProcessDisp implements Ice.TieBase
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Fields inherited from class omero.grid._ScriptProcessDisp
__ids
-
Fields inherited from interface omero.grid.ScriptProcess
ice_staticId
-
-
Constructor Summary
Constructors Constructor Description _ScriptProcessTie()
_ScriptProcessTie(_ScriptProcessOperations delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.boolean
equals(java.lang.Object rhs)
ScriptJob
getJob(Ice.Current __current)
Returns the job which started this process.java.util.Map<java.lang.String,RType>
getResults(int waitSecs, Ice.Current __current)
Returns the results immediately if present.int
hashCode()
java.lang.Object
ice_delegate()
void
ice_delegate(java.lang.Object delegate)
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 eventsjava.lang.String
setMessage(java.lang.String message, Ice.Current __current)
Sets the message on theScriptJob
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-
Methods inherited from class omero.grid._ScriptProcessDisp
___close, ___getJob, ___getResults, ___setMessage, __dispatch, __readImpl, __writeImpl, _wait, cancel, close, getJob, getResults, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId, kill, poll, registerCallback, setMessage, shutdown, unregisterCallback
-
Methods inherited from class Ice.ObjectImpl
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
_ScriptProcessTie
public _ScriptProcessTie()
-
_ScriptProcessTie
public _ScriptProcessTie(_ScriptProcessOperations delegate)
-
-
Method Detail
-
ice_delegate
public java.lang.Object ice_delegate()
- Specified by:
ice_delegate
in interfaceIce.TieBase
-
ice_delegate
public void ice_delegate(java.lang.Object delegate)
- Specified by:
ice_delegate
in interfaceIce.TieBase
-
equals
public boolean equals(java.lang.Object rhs)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
cancel
public boolean cancel(Ice.Current __current) throws ServerError
Description copied from interface:_ProcessOperations
Signal to the Process that it should terminate. This may be done "softly" for a given time period.- Specified by:
cancel
in interface_ProcessOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
kill
public boolean kill(Ice.Current __current)
Description copied from interface:_ProcessOperations
Terminate the Process immediately.- Specified by:
kill
in interface_ProcessOperations
- Parameters:
__current
- The Current object for the invocation.
-
poll
public RInt poll(Ice.Current __current) throws ServerError
Description copied from interface:_ProcessOperations
Returns the return code of the process, or null if unfinished.- Specified by:
poll
in interface_ProcessOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
registerCallback
public void registerCallback(ProcessCallbackPrx cb, Ice.Current __current) throws ServerError
Description copied from interface:_ProcessOperations
Add a callback for end-of-life events- Specified by:
registerCallback
in interface_ProcessOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
shutdown
public void shutdown(Ice.Current __current)
Description copied from interface:_ProcessOperations
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.- Specified by:
shutdown
in interface_ProcessOperations
- Parameters:
__current
- The Current object for the invocation.
-
unregisterCallback
public void unregisterCallback(ProcessCallbackPrx cb, Ice.Current __current) throws ServerError
Description copied from interface:_ProcessOperations
Remove a callback for end-of-life events- Specified by:
unregisterCallback
in interface_ProcessOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
_wait
public int _wait(Ice.Current __current) throws ServerError
Description copied from interface:_ProcessOperations
Blocks until poll() would return a non-null return code.- Specified by:
_wait
in interface_ProcessOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
close
public void close(boolean detach, Ice.Current __current) throws ServerError
Description copied from interface:_ScriptProcessOperations
Closes this process and frees server resources attached to it. If the detach argument is True, then the background process will continue executing. The user can reconnect to the process via theIScript
service. If the detach argument is False, then the background process will be shutdown immediately, and all intermediate results (stdout, stderr, ...) will be uploaded.- Specified by:
close
in interface_ScriptProcessOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
getJob
public ScriptJob getJob(Ice.Current __current) throws ServerError
Description copied from interface:_ScriptProcessOperations
Returns the job which started this process. Several scheduling fields (submitted, scheduledFor, started, finished) may be of interest.- Specified by:
getJob
in interface_ScriptProcessOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
getResults
public java.util.Map<java.lang.String,RType> getResults(int waitSecs, Ice.Current __current) throws ServerError
Description copied from interface:_ScriptProcessOperations
Returns the results immediately if present. If the process is not yet finished, waits "waitSecs" before throwing anApiUsageException
. If poll has returned a non-null value, then this method will always return a non-null value.- Specified by:
getResults
in interface_ScriptProcessOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
setMessage
public java.lang.String setMessage(java.lang.String message, Ice.Current __current) throws ServerError
Description copied from interface:_ScriptProcessOperations
Sets the message on theScriptJob
object. This value MAY be overwritten by the server if the script fails.- Specified by:
setMessage
in interface_ScriptProcessOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
-