Package omero.api
Interface _ISessionOperationsNC
-
- All Superinterfaces:
_ServiceInterfaceOperationsNC
- All Known Subinterfaces:
ISession
- All Known Implementing Classes:
_ISessionDisp,_ISessionTie
public interface _ISessionOperationsNC extends _ServiceInterfaceOperationsNC
Sessioncreation service for OMERO. Access to all other services is dependent upon a properly created and still activeSession. The session uuid (omero.model.Session.getUuid) can be considered a capability token, or temporary single use password. Simply by possessing it the client has access to all information available to theSession. Note: Both the RMIome.system.ServiceFactoryas well as the IceServiceFactoryuseISessionto acquire aSession. In the Ice case, Glacier2 contactsISessionitself and returns a ServiceFactory remote proxy. From both ServiceFactory instances, it is possible but not necessary to accessISession.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseSession_async(AMD_ISession_closeSession __cb, Session sess)Closes session and releases all resources.voidcreateSession_async(AMD_ISession_createSession __cb, Principal p, java.lang.String credentials)Creates a new session and returns it to the user.voidcreateSessionWithTimeout_async(AMD_ISession_createSessionWithTimeout __cb, Principal principal, long timeToLiveMilliseconds)Allows an admin to create aSessionfor the givePrincipal.voidcreateSessionWithTimeouts_async(AMD_ISession_createSessionWithTimeouts __cb, Principal principal, long timeToLiveMilliseconds, long timeToIdleMilliseconds)Allows an admin to create aSessionfor the givenPrincipal.voidcreateUserSession_async(AMD_ISession_createUserSession __cb, long timeToLiveMilliseconds, long timeToIdleMilliseconds, java.lang.String defaultGroup)Allows a user to open up another session for him/herself with the given defaults without needing to re-enter password.voidgetInput_async(AMD_ISession_getInput __cb, java.lang.String sess, java.lang.String key)Retrieves an entry from the givenSessioninput environment.voidgetInputKeys_async(AMD_ISession_getInputKeys __cb, java.lang.String sess)Retrieves all keys in theSessioninput environment.voidgetInputs_async(AMD_ISession_getInputs __cb, java.lang.String sess)Retrieves all inputs from the givenSessioninput environment.voidgetMyOpenAgentSessions_async(AMD_ISession_getMyOpenAgentSessions __cb, java.lang.String agent)LikegetMyOpenSessionsbut returns only those sessions with the given agent string.voidgetMyOpenClientSessions_async(AMD_ISession_getMyOpenClientSessions __cb)LikegetMyOpenSessionsbut returns only those sessions started by official OMERO clients.voidgetMyOpenSessions_async(AMD_ISession_getMyOpenSessions __cb)Returns a list of open sessions for the current user.voidgetOutput_async(AMD_ISession_getOutput __cb, java.lang.String sess, java.lang.String key)Retrieves an entry from theSessionoutput environment.voidgetOutputKeys_async(AMD_ISession_getOutputKeys __cb, java.lang.String sess)Retrieves all keys in theSessionoutput environment.voidgetOutputs_async(AMD_ISession_getOutputs __cb, java.lang.String sess)Retrieves all outputs from the givenSessioninput environment.voidgetReferenceCount_async(AMD_ISession_getReferenceCount __cb, java.lang.String sessionUuid)Retrieves the current reference count for the given uuid.voidgetSession_async(AMD_ISession_getSession __cb, java.lang.String sessionUuid)Retrieves the session associated with this uuid, updating the last access time as well.voidsetInput_async(AMD_ISession_setInput __cb, java.lang.String sess, java.lang.String key, RType value)Places an entry in the givenSessioninput environment.voidsetOutput_async(AMD_ISession_setOutput __cb, java.lang.String sess, java.lang.String key, RType value)Places an entry in the givenSessionoutput environment.
-
-
-
Method Detail
-
createSession_async
void createSession_async(AMD_ISession_createSession __cb, Principal p, java.lang.String credentials) throws Glacier2.CannotCreateSessionException, ServerError
Creates a new session and returns it to the user.- Parameters:
__cb- The callback object for the operation.- Throws:
ApiUsageException- if principal is nullSecurityViolation- if the password check failsGlacier2.CannotCreateSessionExceptionServerError
-
createUserSession_async
void createUserSession_async(AMD_ISession_createUserSession __cb, long timeToLiveMilliseconds, long timeToIdleMilliseconds, java.lang.String defaultGroup) throws Glacier2.CannotCreateSessionException, ServerError
Allows a user to open up another session for him/herself with the given defaults without needing to re-enter password.- Parameters:
__cb- The callback object for the operation.- Throws:
Glacier2.CannotCreateSessionExceptionServerError
-
createSessionWithTimeout_async
void createSessionWithTimeout_async(AMD_ISession_createSessionWithTimeout __cb, Principal principal, long timeToLiveMilliseconds) throws Glacier2.CannotCreateSessionException, ServerError
Allows an admin to create aSessionfor the givePrincipal.- Parameters:
__cb- The callback object for the operation.principal- Non-nullPrincipalwith the target user's nametimeToLiveMilliseconds- The time that thisSessionhas 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.- Throws:
Glacier2.CannotCreateSessionExceptionServerError
-
createSessionWithTimeouts_async
void createSessionWithTimeouts_async(AMD_ISession_createSessionWithTimeouts __cb, Principal principal, long timeToLiveMilliseconds, long timeToIdleMilliseconds) throws Glacier2.CannotCreateSessionException, ServerError
Allows an admin to create aSessionfor the givenPrincipal.- Parameters:
__cb- The callback object for the operation.principal- Non-nullPrincipalwith the target user's nametimeToLiveMilliseconds- The time that thisSessionhas until destruction. Setting the value to 0 will prevent destruction unless the session remains idle.timeToIdleMilliseconds- The time that thisSessioncan remain idle before being destroyed. Setting the value to 0 will prevent idleness based destruction.- Throws:
Glacier2.CannotCreateSessionExceptionServerError
-
getSession_async
void getSession_async(AMD_ISession_getSession __cb, java.lang.String sessionUuid) throws ServerError
Retrieves the session associated with this uuid, updating the last access time as well. Throws aRemovedSessionExceptionif not present, or aSessionTimeoutExceptionif expired. This method can be used as aSessionping.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getReferenceCount_async
void getReferenceCount_async(AMD_ISession_getReferenceCount __cb, java.lang.String sessionUuid) throws ServerError
Retrieves the current reference count for the given uuid. Has the same semantics asgetSession.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
closeSession_async
void closeSession_async(AMD_ISession_closeSession __cb, Session sess) throws ServerError
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.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getMyOpenSessions_async
void getMyOpenSessions_async(AMD_ISession_getMyOpenSessions __cb) throws ServerError
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.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getMyOpenAgentSessions_async
void getMyOpenAgentSessions_async(AMD_ISession_getMyOpenAgentSessions __cb, java.lang.String agent) throws ServerError
LikegetMyOpenSessionsbut returns only those sessions with the given agent string.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getMyOpenClientSessions_async
void getMyOpenClientSessions_async(AMD_ISession_getMyOpenClientSessions __cb) throws ServerError
LikegetMyOpenSessionsbut returns only those sessions started by official OMERO clients.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getInput_async
void getInput_async(AMD_ISession_getInput __cb, java.lang.String sess, java.lang.String key) throws ServerError
Retrieves an entry from the givenSessioninput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getOutput_async
void getOutput_async(AMD_ISession_getOutput __cb, java.lang.String sess, java.lang.String key) throws ServerError
Retrieves an entry from theSessionoutput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
setInput_async
void setInput_async(AMD_ISession_setInput __cb, java.lang.String sess, java.lang.String key, RType value) throws ServerError
Places an entry in the givenSessioninput environment. If the value is null, the key will be removed.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
setOutput_async
void setOutput_async(AMD_ISession_setOutput __cb, java.lang.String sess, java.lang.String key, RType value) throws ServerError
Places an entry in the givenSessionoutput environment. If the value is null, the key will be removed.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getInputKeys_async
void getInputKeys_async(AMD_ISession_getInputKeys __cb, java.lang.String sess) throws ServerError
Retrieves all keys in theSessioninput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getOutputKeys_async
void getOutputKeys_async(AMD_ISession_getOutputKeys __cb, java.lang.String sess) throws ServerError
Retrieves all keys in theSessionoutput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getInputs_async
void getInputs_async(AMD_ISession_getInputs __cb, java.lang.String sess) throws ServerError
Retrieves all inputs from the givenSessioninput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
getOutputs_async
void getOutputs_async(AMD_ISession_getOutputs __cb, java.lang.String sess) throws ServerError
Retrieves all outputs from the givenSessioninput environment.- Parameters:
__cb- The callback object for the operation.- Throws:
ServerError
-
-