Package ome.services.sessions
Class SessionBean
- java.lang.Object
-
- ome.services.sessions.SessionBean
-
- All Implemented Interfaces:
ome.api.ISession
,LocalSession
,ome.api.ServiceInterface
@Transactional public class SessionBean extends java.lang.Object implements LocalSession
Implementation ofISession
. Is merely a wrapper around theSessionManager
Spring-singleton.- Since:
- 3.0-Beta3
-
-
Constructor Summary
Constructors Constructor Description SessionBean(SessionManager mgr, Executor ex, CurrentDetails cd, LightAdminPrivileges adminPrivileges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
closeSession(ome.model.meta.Session session)
ome.model.meta.Session
createSession(ome.system.Principal principal, java.lang.String credentials)
ome.model.meta.Session
createSessionWithTimeout(ome.system.Principal principal, long milliseconds)
ome.model.meta.Session
createSessionWithTimeouts(ome.system.Principal principal, long timeToLiveMilliseconds, long timeToIdleMilliseconds)
ome.model.meta.Session
createUserSession(long timeToLiveMs, long timeToIdleMs, java.lang.String defaultGroup)
java.lang.Object
getInput(java.lang.String session, java.lang.String key)
java.util.Set<java.lang.String>
getInputKeys(java.lang.String session)
java.util.Map<java.lang.String,java.lang.Object>
getInputs(java.lang.String session)
java.util.List<ome.model.meta.Session>
getMyOpenAgentSessions(java.lang.String agent)
java.util.List<ome.model.meta.Session>
getMyOpenClientSessions()
java.util.List<ome.model.meta.Session>
getMyOpenSessions()
java.lang.Object
getOutput(java.lang.String session, java.lang.String key)
java.util.Set<java.lang.String>
getOutputKeys(java.lang.String session)
java.util.Map<java.lang.String,java.lang.Object>
getOutputs(java.lang.String session)
int
getReferenceCount(java.lang.String sessionUuid)
java.lang.Class<? extends ome.api.ServiceInterface>
getServiceInterface()
ome.model.meta.Session
getSession(java.lang.String sessionUuid)
ome.model.meta.Session
getSessionQuietly(java.lang.String sessionUuid)
Lookups a Session without updating the last access time.void
setInput(java.lang.String session, java.lang.String key, java.lang.Object object)
void
setOutput(java.lang.String session, java.lang.String key, java.lang.Object object)
ome.model.meta.Session
updateSession(ome.model.meta.Session session)
-
-
-
Constructor Detail
-
SessionBean
public SessionBean(SessionManager mgr, Executor ex, CurrentDetails cd, LightAdminPrivileges adminPrivileges)
-
-
Method Detail
-
getServiceInterface
public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
-
createUserSession
public ome.model.meta.Session createUserSession(long timeToLiveMs, long timeToIdleMs, java.lang.String defaultGroup)
- Specified by:
createUserSession
in interfaceome.api.ISession
-
createSessionWithTimeout
public ome.model.meta.Session createSessionWithTimeout(ome.system.Principal principal, long milliseconds)
- Specified by:
createSessionWithTimeout
in interfaceome.api.ISession
-
createSessionWithTimeouts
public ome.model.meta.Session createSessionWithTimeouts(ome.system.Principal principal, long timeToLiveMilliseconds, long timeToIdleMilliseconds)
- Specified by:
createSessionWithTimeouts
in interfaceome.api.ISession
-
createSession
public ome.model.meta.Session createSession(ome.system.Principal principal, java.lang.String credentials)
- Specified by:
createSession
in interfaceome.api.ISession
-
getSession
public ome.model.meta.Session getSession(java.lang.String sessionUuid)
- Specified by:
getSession
in interfaceome.api.ISession
-
getSessionQuietly
public ome.model.meta.Session getSessionQuietly(java.lang.String sessionUuid)
Description copied from interface:LocalSession
Lookups a Session without updating the last access time. Otherwise, behaves identically to#getSession()
.- Specified by:
getSessionQuietly
in interfaceLocalSession
-
getReferenceCount
public int getReferenceCount(java.lang.String sessionUuid)
- Specified by:
getReferenceCount
in interfaceome.api.ISession
-
updateSession
public ome.model.meta.Session updateSession(ome.model.meta.Session session)
-
closeSession
public int closeSession(ome.model.meta.Session session)
- Specified by:
closeSession
in interfaceome.api.ISession
-
getMyOpenSessions
public java.util.List<ome.model.meta.Session> getMyOpenSessions()
- Specified by:
getMyOpenSessions
in interfaceome.api.ISession
-
getMyOpenAgentSessions
public java.util.List<ome.model.meta.Session> getMyOpenAgentSessions(java.lang.String agent)
- Specified by:
getMyOpenAgentSessions
in interfaceome.api.ISession
-
getMyOpenClientSessions
public java.util.List<ome.model.meta.Session> getMyOpenClientSessions()
- Specified by:
getMyOpenClientSessions
in interfaceome.api.ISession
-
getInput
public java.lang.Object getInput(java.lang.String session, java.lang.String key)
- Specified by:
getInput
in interfaceome.api.ISession
-
getOutput
public java.lang.Object getOutput(java.lang.String session, java.lang.String key)
- Specified by:
getOutput
in interfaceome.api.ISession
-
setInput
public void setInput(java.lang.String session, java.lang.String key, java.lang.Object object)
- Specified by:
setInput
in interfaceome.api.ISession
-
setOutput
public void setOutput(java.lang.String session, java.lang.String key, java.lang.Object object)
- Specified by:
setOutput
in interfaceome.api.ISession
-
getInputKeys
public java.util.Set<java.lang.String> getInputKeys(java.lang.String session)
- Specified by:
getInputKeys
in interfaceome.api.ISession
-
getOutputKeys
public java.util.Set<java.lang.String> getOutputKeys(java.lang.String session)
- Specified by:
getOutputKeys
in interfaceome.api.ISession
-
getInputs
public java.util.Map<java.lang.String,java.lang.Object> getInputs(java.lang.String session)
- Specified by:
getInputs
in interfaceome.api.ISession
-
getOutputs
public java.util.Map<java.lang.String,java.lang.Object> getOutputs(java.lang.String session)
- Specified by:
getOutputs
in interfaceome.api.ISession
-
-