Package omero.grid
Class _ScriptProcessDisp
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.grid._ScriptProcessDisp
-
- All Implemented Interfaces:
Ice.Object
,java.io.Serializable
,java.lang.Cloneable
,_ProcessOperations
,_ProcessOperationsNC
,_ScriptProcessOperations
,_ScriptProcessOperationsNC
,Process
,ScriptProcess
- Direct Known Subclasses:
_ScriptProcessTie
public abstract class _ScriptProcessDisp extends Ice.ObjectImpl implements ScriptProcess
Extension of theProcess
interface which is returned byIScript
when anScriptJob
is launched. It is critical that instances of (@code ScriptProcess} are closed on completion. See theclose(boolean)
method for more information.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
__ids
static long
serialVersionUID
-
Fields inherited from interface omero.grid.ScriptProcess
ice_staticId
-
-
Constructor Summary
Constructors Constructor Description _ScriptProcessDisp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ice.DispatchStatus
___close(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getJob(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getResults(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___setMessage(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
Ice.DispatchStatus
__dispatch(IceInternal.Incoming in, Ice.Current __current)
protected void
__readImpl(IceInternal.BasicStream __is)
protected void
__writeImpl(IceInternal.BasicStream __os)
int
_wait()
Blocks until poll() would return a non-null return code.boolean
cancel()
Signal to the Process that it should terminate.void
close(boolean detach)
Closes this process and frees server resources attached to it.ScriptJob
getJob()
Returns the job which started this process.java.util.Map<java.lang.String,RType>
getResults(int waitSecs)
Returns the results immediately if present.protected void
ice_copyStateFrom(Ice.Object __obj)
java.lang.String
ice_id()
java.lang.String
ice_id(Ice.Current __current)
java.lang.String[]
ice_ids()
java.lang.String[]
ice_ids(Ice.Current __current)
boolean
ice_isA(java.lang.String s)
boolean
ice_isA(java.lang.String s, Ice.Current __current)
static java.lang.String
ice_staticId()
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 eventsjava.lang.String
setMessage(java.lang.String message)
Sets the message on theScriptJob
object.void
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-
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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface omero.grid._ProcessOperations
_wait, cancel, kill, poll, registerCallback, shutdown, unregisterCallback
-
Methods inherited from interface omero.grid._ScriptProcessOperations
close, getJob, getResults, setMessage
-
-
-
-
Field Detail
-
__ids
public static final java.lang.String[] __ids
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
ice_copyStateFrom
protected void ice_copyStateFrom(Ice.Object __obj) throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException
-
ice_isA
public boolean ice_isA(java.lang.String s)
- Specified by:
ice_isA
in interfaceIce.Object
- Overrides:
ice_isA
in classIce.ObjectImpl
-
ice_isA
public boolean ice_isA(java.lang.String s, Ice.Current __current)
- Specified by:
ice_isA
in interfaceIce.Object
- Overrides:
ice_isA
in classIce.ObjectImpl
-
ice_ids
public java.lang.String[] ice_ids()
- Specified by:
ice_ids
in interfaceIce.Object
- Overrides:
ice_ids
in classIce.ObjectImpl
-
ice_ids
public java.lang.String[] ice_ids(Ice.Current __current)
- Specified by:
ice_ids
in interfaceIce.Object
- Overrides:
ice_ids
in classIce.ObjectImpl
-
ice_id
public java.lang.String ice_id()
- Specified by:
ice_id
in interfaceIce.Object
- Overrides:
ice_id
in classIce.ObjectImpl
-
ice_id
public java.lang.String ice_id(Ice.Current __current)
- Specified by:
ice_id
in interfaceIce.Object
- Overrides:
ice_id
in classIce.ObjectImpl
-
ice_staticId
public static java.lang.String ice_staticId()
-
cancel
public final boolean cancel() throws ServerError
Signal to the Process that it should terminate. This may be done "softly" for a given time period.- Specified by:
cancel
in interface_ProcessOperationsNC
- Throws:
ServerError
-
kill
public final boolean kill()
Terminate the Process immediately.- Specified by:
kill
in interface_ProcessOperationsNC
-
poll
public final RInt poll() throws ServerError
Returns the return code of the process, or null if unfinished.- Specified by:
poll
in interface_ProcessOperationsNC
- Throws:
ServerError
-
registerCallback
public final void registerCallback(ProcessCallbackPrx cb) throws ServerError
Add a callback for end-of-life events- Specified by:
registerCallback
in interface_ProcessOperationsNC
- Throws:
ServerError
-
shutdown
public final 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.- Specified by:
shutdown
in interface_ProcessOperationsNC
-
unregisterCallback
public final void unregisterCallback(ProcessCallbackPrx cb) throws ServerError
Remove a callback for end-of-life events- Specified by:
unregisterCallback
in interface_ProcessOperationsNC
- Throws:
ServerError
-
_wait
public final int _wait() throws ServerError
Blocks until poll() would return a non-null return code.- Specified by:
_wait
in interface_ProcessOperationsNC
- Throws:
ServerError
-
close
public final void close(boolean detach) throws ServerError
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_ScriptProcessOperationsNC
- Throws:
ServerError
-
getJob
public final ScriptJob getJob() throws ServerError
Returns the job which started this process. Several scheduling fields (submitted, scheduledFor, started, finished) may be of interest.- Specified by:
getJob
in interface_ScriptProcessOperationsNC
- Throws:
ServerError
-
getResults
public final java.util.Map<java.lang.String,RType> getResults(int waitSecs) throws ServerError
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_ScriptProcessOperationsNC
- Throws:
ServerError
-
setMessage
public final java.lang.String setMessage(java.lang.String message) throws ServerError
Sets the message on theScriptJob
object. This value MAY be overwritten by the server if the script fails.- Specified by:
setMessage
in interface_ScriptProcessOperationsNC
- Throws:
ServerError
-
___getJob
public static Ice.DispatchStatus ___getJob(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getResults
public static Ice.DispatchStatus ___getResults(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___setMessage
public static Ice.DispatchStatus ___setMessage(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___close
public static Ice.DispatchStatus ___close(ScriptProcess __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
__dispatch
public Ice.DispatchStatus __dispatch(IceInternal.Incoming in, Ice.Current __current)
- Specified by:
__dispatch
in interfaceIce.Object
- Overrides:
__dispatch
in classIce.ObjectImpl
-
__writeImpl
protected void __writeImpl(IceInternal.BasicStream __os)
- Overrides:
__writeImpl
in classIce.ObjectImpl
-
__readImpl
protected void __readImpl(IceInternal.BasicStream __is)
- Overrides:
__readImpl
in classIce.ObjectImpl
-
-