public class HandleI extends Object implements omero.cmd._HandleOperations, IHandle, SessionAware
Runnable and is passed to a ThreadPool instance
Transitions:
+------------------o [FINISHED]
| o
| |
(CREATED) ---o READY o===o RUNNING o===o CANCELLING ---o [CANCELLED]
| | o o
| |---------------------------| |
+--------------------------------------------------------+
| Modifier and Type | Class and Description |
|---|---|
static class |
HandleI.Cancel
|
| Constructor and Description |
|---|
HandleI(int cancelTimeoutMs)
Create a
HandleI in the State#CREATED state with the
given cancel timeout in milliseconds. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(omero.cmd.CmdCallbackPrx cb,
Ice.Current __current) |
boolean |
cancel(Ice.Current __current) |
void |
close(Ice.Current current) |
omero.cmd.Request |
getRequest(Ice.Current __current) |
omero.cmd.Response |
getResponse(Ice.Current __current) |
omero.cmd.Status |
getStatus(Ice.Current __current) |
void |
initialize(Ice.Identity id,
IRequest req,
Map<String,String> ctx)
Must be called on all instances exactly once before processing.
|
void |
notifyCallbacks()
Calls the proper notification on all callbacks based on the current
state. |
void |
removeCallback(omero.cmd.CmdCallbackPrx cb,
Ice.Current __current) |
void |
run()
NB: only executes if
state is State#CREATED. |
void |
setSession(SessionI session) |
List<Object> |
steps(ome.util.SqlAction sql,
org.hibernate.Session session,
ServiceFactory sf) |
public HandleI(int cancelTimeoutMs)
HandleI in the State#CREATED state with the
given cancel timeout in milliseconds.public void setSession(SessionI session) throws omero.ServerError
setSession in interface SessionAwareomero.ServerErrorpublic void initialize(Ice.Identity id,
IRequest req,
Map<String,String> ctx)
IHandleinitialize in interface IHandleid - Ice identity of this instance. Cannot be null.req - Request to be processed. Must also be an
Request instance.ctx - Possibly null call context which will be passed to
Executor.execute(Map, ome.system.Principal, ome.services.util.Executor.Work)public void addCallback(omero.cmd.CmdCallbackPrx cb,
Ice.Current __current)
addCallback in interface omero.cmd._HandleOperationspublic void removeCallback(omero.cmd.CmdCallbackPrx cb,
Ice.Current __current)
removeCallback in interface omero.cmd._HandleOperationspublic void notifyCallbacks()
state. If the State is anything other than
State.CANCELLED or State#FINISHED then
CmdCallbackPrx.step(int, int) is called.public omero.cmd.Request getRequest(Ice.Current __current)
getRequest in interface omero.cmd._HandleOperationspublic omero.cmd.Response getResponse(Ice.Current __current)
getResponse in interface omero.cmd._HandleOperationspublic omero.cmd.Status getStatus(Ice.Current __current)
getStatus in interface omero.cmd._HandleOperationspublic boolean cancel(Ice.Current __current)
throws omero.LockTimeout
cancel in interface omero.cmd._HandleOperationsomero.LockTimeoutpublic void close(Ice.Current current)
close in interface omero.cmd._HandleOperationsclose in interface CloseableServantpublic void run()
state is State#CREATED.public List<Object> steps(ome.util.SqlAction sql, org.hibernate.Session session, ServiceFactory sf) throws HandleI.Cancel
HandleI.Cancel
Version: 5.1.1-ice35-b43
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.