public class HandleI extends java.lang.Object implements _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)
Deprecated.
|
HandleI(ome.services.util.ReadOnlyStatus readOnly,
int cancelTimeoutMs)
Create a
HandleI (at CREATED in the state diagram)
with the given cancel timeout in milliseconds. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(CmdCallbackPrx cb,
Ice.Current __current)
Add a callback for notifications.
|
boolean |
cancel(Ice.Current __current)
Attempts to cancel execution of this
Request. |
void |
close(Ice.Current current)
Closes this handle.
|
Request |
getRequest(Ice.Current __current)
Returns the request object that was used to
initialize this handle.
|
Response |
getResponse(Ice.Current __current)
Returns a response if this handle has finished
execution, otherwise returns null.
|
Status |
getStatus(Ice.Current __current)
Returns a status object for the current execution.
|
void |
initialize(Ice.Identity id,
IRequest req,
java.util.Map<java.lang.String,java.lang.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
position in the state diagram.
|
void |
removeCallback(CmdCallbackPrx cb,
Ice.Current __current)
Remove callback for notifications.
|
void |
run()
NB: Executes only if at
CREATED in the state diagram. |
void |
setSession(SessionI session) |
java.util.List<java.lang.Object> |
steps(ome.util.SqlAction sql,
org.hibernate.Session session,
ome.system.ServiceFactory sf) |
@Deprecated public HandleI(int cancelTimeoutMs)
public HandleI(ome.services.util.ReadOnlyStatus readOnly,
int cancelTimeoutMs)
HandleI (at CREATED in the state diagram)
with the given cancel timeout in milliseconds.readOnly - the read-only statuscancelTimeoutMs - the cancel timeout (in milliseconds)public void setSession(SessionI session) throws ServerError
setSession in interface SessionAwareServerErrorpublic void initialize(Ice.Identity id,
IRequest req,
java.util.Map<java.lang.String,java.lang.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(CmdCallbackPrx cb, Ice.Current __current)
_HandleOperationsaddCallback in interface _HandleOperations__current - The Current object for the invocation.public void removeCallback(CmdCallbackPrx cb, Ice.Current __current)
_HandleOperationsremoveCallback in interface _HandleOperations__current - The Current object for the invocation.public void notifyCallbacks()
CANCELLED or FINISHED then
CmdCallbackPrx.step(int, int) is called.public Request getRequest(Ice.Current __current)
_HandleOperationsgetRequest in interface _HandleOperations__current - The Current object for the invocation.public Response getResponse(Ice.Current __current)
_HandleOperationsgetResponse in interface _HandleOperations__current - The Current object for the invocation.public Status getStatus(Ice.Current __current)
_HandleOperationsResponse value.
Never null.getStatus in interface _HandleOperations__current - The Current object for the invocation.public boolean cancel(Ice.Current __current)
throws LockTimeout
_HandleOperationsRequest. Returns
true if cancellation was successful. Returns false if not,
in which case likely this request will run to completion.cancel in interface _HandleOperations__current - The Current object for the invocation.LockTimeoutpublic void close(Ice.Current current)
_HandleOperationsclose in interface _HandleOperationsclose in interface CloseableServantcurrent - The Current object for the invocation.public void run()
CREATED in the state diagram.run in interface java.lang.Runnablepublic java.util.List<java.lang.Object> steps(ome.util.SqlAction sql,
org.hibernate.Session session,
ome.system.ServiceFactory sf)
throws HandleI.Cancel
HandleI.Cancel