Class GroovySession
- java.lang.Object
-
- groovy.lang.GroovyObjectSupport
-
- de.uplanet.lucy.server.portalserver.GroovySession
-
-
Field Summary
-
Fields inherited from interface de.uplanet.lucy.server.session.ISession
DEFAULT_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description GroovySession(ISession p_session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(de.uplanet.lucy.server.session.ISessionListener p_listener, boolean p_bWeak)Add a listener for session events.booleancontainsKey(String p_strKey)Test if a certain session variable exists.Objectget(String p_strKey)Get a session variable.Objectget(String p_strKey, Object p_objFallback)Get a session variable or the specified fallback value.ObjectgetAt(String p_strKey)StringgetAuthConfigName()Get the name of the authentication configuration used to login this session.longgetCreationTime()Get the time when this session was created.StringgetId()Get the unique session identifier.Set<String>getKeySet()longgetLastAccessTime()Get the time of the last access to this session.ObjectgetProperty(String p_strKey)SubjectgetSubject()Get the subject that is associated with this session.longgetTimeout()Get the session timeout.IUsergetUser()Get the user that is associated with the session.booleanisAnonymous()Determine if the session is an anonymous session.booleanisLoggedOut()Check if the session is logged out.booleanisStale()Check if the session has timed out.booleanisStale(long p_lTimeNow)Test if the session has timed out.Iterator<Map.Entry<String,Object>>iterator()Set<String>keySet()Get a set that contains all session variable names.voidlogout()Performs a logout on this session.voidput(String p_strKey, Object p_objValue)Set a session variable.voidputAt(String p_strKey, Object p_value)voidremove(String p_strKey)Remove a session variable.voidsetProperty(String p_strKey, Object p_value)voidsetTimeout(long p_lTimeout)Set the session timeout.voidtouch()Touch the session.
-
-
-
Constructor Detail
-
GroovySession
public GroovySession(ISession p_session)
-
-
Method Detail
-
getAuthConfigName
public String getAuthConfigName()
Description copied from interface:ISessionGet the name of the authentication configuration used to login this session.- Specified by:
getAuthConfigNamein interfaceISession- Returns:
- The name of the authentication configuration.
-
containsKey
public boolean containsKey(String p_strKey)
Description copied from interface:ISessionTest if a certain session variable exists.- Specified by:
containsKeyin interfaceISession- Parameters:
p_strKey- The name of the session variable.
-
get
public Object get(String p_strKey)
Description copied from interface:ISessionGet a session variable.
-
get
public Object get(String p_strKey, Object p_objFallback)
Description copied from interface:ISessionGet a session variable or the specified fallback value.
-
put
public void put(String p_strKey, Object p_objValue)
Description copied from interface:ISessionSet a session variable.
-
remove
public void remove(String p_strKey)
Description copied from interface:ISessionRemove a session variable.
-
getCreationTime
public long getCreationTime()
Description copied from interface:ISessionGet the time when this session was created.- Specified by:
getCreationTimein interfaceISession- Returns:
- The creation time, measured in milliseconds, between the current time and 01-01-1970 00:00:00 UTC.
-
getId
public String getId()
Description copied from interface:ISessionGet the unique session identifier.
-
getSubject
public Subject getSubject()
Description copied from interface:ISessionGet the subject that is associated with this session.- Specified by:
getSubjectin interfaceISession- Returns:
- The associated subject.
-
getTimeout
public long getTimeout()
Description copied from interface:ISessionGet the session timeout.- Specified by:
getTimeoutin interfaceISession- Returns:
- p_lTimeout The timeout in milliseconds.
-
getUser
public IUser getUser()
Description copied from interface:ISessionGet the user that is associated with the session.
-
isAnonymous
public boolean isAnonymous()
Description copied from interface:ISessionDetermine if the session is an anonymous session.- Specified by:
isAnonymousin interfaceISession- Returns:
trueif the session is anonymous,falseotherwise.
-
isLoggedOut
public boolean isLoggedOut()
Description copied from interface:ISessionCheck if the session is logged out.- Specified by:
isLoggedOutin interfaceISession- Returns:
trueis the session is logged out, orfalseotherwise.
-
getLastAccessTime
public long getLastAccessTime()
Description copied from interface:ISessionGet the time of the last access to this session.- Specified by:
getLastAccessTimein interfaceISession- Returns:
- The time of last access.
-
isStale
public boolean isStale()
Description copied from interface:ISessionCheck if the session has timed out.The natural implementation of this method will return
isStale(System.currentTimeMillis()).
-
isStale
public boolean isStale(long p_lTimeNow)
Description copied from interface:ISessionTest if the session has timed out.
-
keySet
public Set<String> keySet()
Description copied from interface:ISessionGet a set that contains all session variable names.
-
logout
public void logout()
Description copied from interface:ISessionPerforms a logout on this session.
-
setTimeout
public void setTimeout(long p_lTimeout)
Description copied from interface:ISessionSet the session timeout.- Specified by:
setTimeoutin interfaceISession- Parameters:
p_lTimeout- The timeout in milliseconds.
-
touch
public void touch()
Description copied from interface:ISessionTouch the session.
-
addListener
public void addListener(de.uplanet.lucy.server.session.ISessionListener p_listener, boolean p_bWeak)Description copied from interface:ISessionAdd a listener for session events.- Specified by:
addListenerin interfaceISession- Parameters:
p_listener- The session listener to add.p_bWeak-trueif the listener should be weakly referenced,falseotherwise.
-
getProperty
public Object getProperty(String p_strKey)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String p_strKey, Object p_value)
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject
-
-