Package ome.services.blitz.impl
Class SessionI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.SessionI
-
- All Implemented Interfaces:
_ISessionOperations
,_ServiceInterfaceOperations
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class SessionI extends AbstractAmdServant implements _ISessionOperations
Implementation of the ISession service.- Since:
- 3.0-Beta4
- See Also:
ISession
-
-
Constructor Summary
Constructors Constructor Description SessionI(ome.api.local.LocalSession service, BlitzExecutor be)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeSession_async(AMD_ISession_closeSession __cb, Session sess, Ice.Current __current)
Closes session and releases all resources.void
createSession_async(AMD_ISession_createSession __cb, Principal p, java.lang.String credentials, Ice.Current __current)
Creates a new session and returns it to the user.void
createSessionWithTimeout_async(AMD_ISession_createSessionWithTimeout __cb, Principal p, long ttlMs, Ice.Current __current)
Allows an admin to create aSession
for the givePrincipal
.void
createSessionWithTimeouts_async(AMD_ISession_createSessionWithTimeouts __cb, Principal p, long ttlMs, long ttiMs, Ice.Current __current)
Allows an admin to create aSession
for the givenPrincipal
.void
createUserSession_async(AMD_ISession_createUserSession __cb, long arg0, long arg1, java.lang.String arg2, Ice.Current __current)
Allows a user to open up another session for him/herself with the given defaults without needing to re-enter password.void
getInput_async(AMD_ISession_getInput __cb, java.lang.String sess, java.lang.String key, Ice.Current __current)
Retrieves an entry from the givenSession
input environment.void
getInputKeys_async(AMD_ISession_getInputKeys __cb, java.lang.String sess, Ice.Current __current)
Retrieves all keys in theSession
input environment.void
getInputs_async(AMD_ISession_getInputs __cb, java.lang.String sess, Ice.Current __current)
Retrieves all inputs from the givenSession
input environment.void
getMyOpenAgentSessions_async(AMD_ISession_getMyOpenAgentSessions __cb, java.lang.String agent, Ice.Current __current)
LikegetMyOpenSessions
but returns only those sessions with the given agent string.void
getMyOpenClientSessions_async(AMD_ISession_getMyOpenClientSessions __cb, Ice.Current __current)
LikegetMyOpenSessions
but returns only those sessions started by official OMERO clients.void
getMyOpenSessions_async(AMD_ISession_getMyOpenSessions __cb, Ice.Current __current)
Returns a list of open sessions for the current user.void
getOutput_async(AMD_ISession_getOutput __cb, java.lang.String sess, java.lang.String key, Ice.Current __current)
Retrieves an entry from theSession
output environment.void
getOutputKeys_async(AMD_ISession_getOutputKeys __cb, java.lang.String sess, Ice.Current __current)
Retrieves all keys in theSession
output environment.void
getOutputs_async(AMD_ISession_getOutputs __cb, java.lang.String sess, Ice.Current __current)
Retrieves all outputs from the givenSession
input environment.void
getReferenceCount_async(AMD_ISession_getReferenceCount __cb, java.lang.String sessionUuid, Ice.Current __current)
Retrieves the current reference count for the given uuid.void
getSession_async(AMD_ISession_getSession __cb, java.lang.String sessionUuid, Ice.Current __current)
Retrieves the session associated with this uuid, updating the last access time as well.void
setInput_async(AMD_ISession_setInput __cb, java.lang.String sess, java.lang.String key, RType value, Ice.Current __current)
Places an entry in the givenSession
input environment.void
setOutput_async(AMD_ISession_setOutput __cb, java.lang.String sess, java.lang.String key, RType value, Ice.Current __current)
Places an entry in the givenSession
output environment.-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
-
-
-
Constructor Detail
-
SessionI
public SessionI(ome.api.local.LocalSession service, BlitzExecutor be)
-
-
Method Detail
-
closeSession_async
public void closeSession_async(AMD_ISession_closeSession __cb, Session sess, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Closes session and releases all resources. It is preferred that all clients call this method as soon as possible to free memory, but it is possible to not call close, and rejoin a session later. The current reference count for the session is returned. If the session does not exist, -1. If this call caused the death of the session, then -2.- Specified by:
closeSession_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
createSessionWithTimeout_async
public void createSessionWithTimeout_async(AMD_ISession_createSessionWithTimeout __cb, Principal p, long ttlMs, Ice.Current __current) throws ServerError, Glacier2.CannotCreateSessionException
Description copied from interface:_ISessionOperations
Allows an admin to create aSession
for the givePrincipal
.- Specified by:
createSessionWithTimeout_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.p
- Non-nullPrincipal
with the target user's namettlMs
- The time that thisSession
has until destruction. This is useful to override the server default so that an initial delay before the user is given the token will not be construed as idle time. A value less than 1 will cause the default max timeToLive to be used; but timeToIdle will be disabled.__current
- The Current object for the invocation.- Throws:
ServerError
Glacier2.CannotCreateSessionException
-
createSessionWithTimeouts_async
public void createSessionWithTimeouts_async(AMD_ISession_createSessionWithTimeouts __cb, Principal p, long ttlMs, long ttiMs, Ice.Current __current) throws ServerError, Glacier2.CannotCreateSessionException
Description copied from interface:_ISessionOperations
Allows an admin to create aSession
for the givenPrincipal
.- Specified by:
createSessionWithTimeouts_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.p
- Non-nullPrincipal
with the target user's namettlMs
- The time that thisSession
has until destruction. Setting the value to 0 will prevent destruction unless the session remains idle.ttiMs
- The time that thisSession
can remain idle before being destroyed. Setting the value to 0 will prevent idleness based destruction.__current
- The Current object for the invocation.- Throws:
ServerError
Glacier2.CannotCreateSessionException
-
createSession_async
public void createSession_async(AMD_ISession_createSession __cb, Principal p, java.lang.String credentials, Ice.Current __current) throws ServerError, Glacier2.CannotCreateSessionException
Description copied from interface:_ISessionOperations
Creates a new session and returns it to the user.- Specified by:
createSession_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
Glacier2.CannotCreateSessionException
-
createUserSession_async
public void createUserSession_async(AMD_ISession_createUserSession __cb, long arg0, long arg1, java.lang.String arg2, Ice.Current __current) throws ServerError, Glacier2.CannotCreateSessionException
Description copied from interface:_ISessionOperations
Allows a user to open up another session for him/herself with the given defaults without needing to re-enter password.- Specified by:
createUserSession_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
Glacier2.CannotCreateSessionException
-
getInputKeys_async
public void getInputKeys_async(AMD_ISession_getInputKeys __cb, java.lang.String sess, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves all keys in theSession
input environment.- Specified by:
getInputKeys_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getInput_async
public void getInput_async(AMD_ISession_getInput __cb, java.lang.String sess, java.lang.String key, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves an entry from the givenSession
input environment.- Specified by:
getInput_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getOutputKeys_async
public void getOutputKeys_async(AMD_ISession_getOutputKeys __cb, java.lang.String sess, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves all keys in theSession
output environment.- Specified by:
getOutputKeys_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getOutput_async
public void getOutput_async(AMD_ISession_getOutput __cb, java.lang.String sess, java.lang.String key, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves an entry from theSession
output environment.- Specified by:
getOutput_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getSession_async
public void getSession_async(AMD_ISession_getSession __cb, java.lang.String sessionUuid, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves the session associated with this uuid, updating the last access time as well. Throws aRemovedSessionException
if not present, or aSessionTimeoutException
if expired. This method can be used as aSession
ping.- Specified by:
getSession_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getReferenceCount_async
public void getReferenceCount_async(AMD_ISession_getReferenceCount __cb, java.lang.String sessionUuid, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves the current reference count for the given uuid. Has the same semantics asgetSession
.- Specified by:
getReferenceCount_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
setInput_async
public void setInput_async(AMD_ISession_setInput __cb, java.lang.String sess, java.lang.String key, RType value, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Places an entry in the givenSession
input environment. If the value is null, the key will be removed.- Specified by:
setInput_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
setOutput_async
public void setOutput_async(AMD_ISession_setOutput __cb, java.lang.String sess, java.lang.String key, RType value, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Places an entry in the givenSession
output environment. If the value is null, the key will be removed.- Specified by:
setOutput_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getInputs_async
public void getInputs_async(AMD_ISession_getInputs __cb, java.lang.String sess, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves all inputs from the givenSession
input environment.- Specified by:
getInputs_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getOutputs_async
public void getOutputs_async(AMD_ISession_getOutputs __cb, java.lang.String sess, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Retrieves all outputs from the givenSession
input environment.- Specified by:
getOutputs_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getMyOpenAgentSessions_async
public void getMyOpenAgentSessions_async(AMD_ISession_getMyOpenAgentSessions __cb, java.lang.String agent, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
LikegetMyOpenSessions
but returns only those sessions with the given agent string.- Specified by:
getMyOpenAgentSessions_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getMyOpenClientSessions_async
public void getMyOpenClientSessions_async(AMD_ISession_getMyOpenClientSessions __cb, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
LikegetMyOpenSessions
but returns only those sessions started by official OMERO clients.- Specified by:
getMyOpenClientSessions_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getMyOpenSessions_async
public void getMyOpenSessions_async(AMD_ISession_getMyOpenSessions __cb, Ice.Current __current) throws ServerError
Description copied from interface:_ISessionOperations
Returns a list of open sessions for the current user. The list is ordered by session creation time, so that the last item was created last.- Specified by:
getMyOpenSessions_async
in interface_ISessionOperations
- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
-