|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.sessions.SessionBean
@Transactional public class SessionBean
Implementation of ISession
. Is merely a wrapper around the
SessionManager
Spring-singleton.
Constructor Summary | |
---|---|
SessionBean(SessionManager mgr,
Executor ex,
CurrentDetails cd)
|
Method Summary | |
---|---|
int |
closeSession(ome.model.meta.Session session)
Closes session and releases all resources. |
ome.model.meta.Session |
createSession(Principal principal,
String credentials)
Creates a new session and returns it to the user. |
ome.model.meta.Session |
createSessionWithTimeout(Principal principal,
long milliseconds)
Allows an admin to create a Session for the give
Principal |
ome.model.meta.Session |
createSessionWithTimeouts(Principal principal,
long timeToLiveMilliseconds,
long timeToIdleMilliseconds)
Allows an admin to create a Session for the give
Principal |
ome.model.meta.Session |
createUserSession(long timeToLiveMs,
long timeToIdleMs,
String defaultGroup,
ome.model.internal.Permissions umask)
Allows a user to open up another session for him/herself with the given defaults without needing to re-enter password. |
Object |
getInput(String session,
String key)
Retrieves an entry from the given session's input
environment. |
Set<String> |
getInputKeys(String session)
Retrieves all keys in the sesson's input environment. |
Object |
getOutput(String session,
String key)
Retrieves an entry from the session's output environment. |
Set<String> |
getOutputKeys(String session)
Retrieves all keys in the sesson's output environment. |
int |
getReferenceCount(String sessionUuid)
Retrieves the current reference count for the given uuid. |
Class<? extends ServiceInterface> |
getServiceInterface()
|
ome.model.meta.Session |
getSession(String sessionUuid)
Retrieves the session associated with this uuid, updating the last access time as well. |
void |
setInput(String session,
String key,
Object object)
Places an entry in the given session's input environment. |
void |
setOutput(String session,
String key,
Object object)
Places an entry in the given session's output
environment. |
ome.model.meta.Session |
updateSession(ome.model.meta.Session session)
Updates subset of the fields from the Session object to the
Session matching the given uuid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionBean(SessionManager mgr, Executor ex, CurrentDetails cd)
Method Detail |
---|
public Class<? extends ServiceInterface> getServiceInterface()
public ome.model.meta.Session createUserSession(long timeToLiveMs, long timeToIdleMs, String defaultGroup, ome.model.internal.Permissions umask)
ISession
createUserSession
in interface ISession
public ome.model.meta.Session createSessionWithTimeout(Principal principal, long milliseconds)
ISession
Session
for the give
Principal
createSessionWithTimeout
in interface ISession
principal
- Non-null Principal
with the target user's namemilliseconds
- The time that this Session
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.public ome.model.meta.Session createSessionWithTimeouts(Principal principal, long timeToLiveMilliseconds, long timeToIdleMilliseconds)
ISession
Session
for the give
Principal
createSessionWithTimeouts
in interface ISession
principal
- Non-null Principal
with the target user's nametimeToIdleMilliseconds
- The time that this Session
can remain idle before
being destroyed. Setting the value to 0 will prevent idleness
based destruction.public ome.model.meta.Session createSession(Principal principal, String credentials)
ISession
createSession
in interface ISession
public ome.model.meta.Session getSession(String sessionUuid)
ISession
RemovedSessionException
if not present, or
a SessionTimeoutException
if expired.
This method can be used as a Session
ping.
getSession
in interface ISession
public int getReferenceCount(String sessionUuid)
ISession
ISession.getSession(String)
.
getReferenceCount
in interface ISession
public ome.model.meta.Session updateSession(ome.model.meta.Session session)
ISession
Session
object to the
Session
matching the given uuid. If the uuid
is not present, then a RemovedSessionException
is thrown.
Updated: group, Session.userAgent
, Session.message
,
Session#defaultUmask
, Session.setDefaultEventType(String)
Conditionally updated: timeToLive, timeToIdle These can only be set
within boundaries provided by the system administrator. Currently this is
hard-coded to mean 10 times the defaultTimeToLive and defaultTimeToIdle,
respectively.
Ignored: All others, but especially user, Session.events
Session.uuid
, and the timestamps.
updateSession
in interface ISession
session
- The Session
instance to be updated.
Session
updated instance. Should replace the current
value: session = iSession.updateSession(session);
public int closeSession(ome.model.meta.Session session)
ISession
closeSession
in interface ISession
public Object getInput(String session, String key)
ISession
session's
input
environment. If the value is null, the key will be removed.
getInput
in interface ISession
public Object getOutput(String session, String key)
ISession
session's
output environment.
getOutput
in interface ISession
public void setInput(String session, String key, Object object)
ISession
session's
input environment.
If the value is null, the key will be removed.
setInput
in interface ISession
public void setOutput(String session, String key, Object object)
ISession
session's
output
environment. If the value is null, the key will be removed.
setOutput
in interface ISession
public Set<String> getInputKeys(String session)
ISession
sesson's
input environment.
getInputKeys
in interface ISession
public Set<String> getOutputKeys(String session)
ISession
sesson's
output environment.
getOutputKeys
in interface ISession
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.