Class GroovySession
java.lang.Object
groovy.lang.GroovyObjectSupport
de.uplanet.lucy.server.portalserver.GroovySession
- All Implemented Interfaces:
ISession,groovy.lang.GroovyObject
@Scriptable
public final class GroovySession
extends groovy.lang.GroovyObjectSupport
implements ISession
-
Field Summary
Fields inherited from interface de.uplanet.lucy.server.session.ISession
DEFAULT_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(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.Get a session variable.Get a session variable or the specified fallback value.Get the name of the authentication configuration used to login this session.longGet the time when this session was created.getId()Get the unique session identifier.longGet the time of the last access to this session.getProperty(String p_strKey) Get the subject that is associated with this session.longGet the session timeout.getUser()Get the user that is associated with the session.booleanDetermine if the session is an anonymous session.booleanCheck 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()keySet()Get a set that contains all session variable names.voidlogout()Performs a logout on this session.voidSet a session variable.voidvoidRemove a session variable.voidsetProperty(String p_strKey, Object p_value) voidsetTimeout(long p_lTimeout) Set the session timeout.voidtouch()Touch the session.Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClassMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObject
invokeMethod
-
Constructor Details
-
GroovySession
-
-
Method Details
-
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
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
Description copied from interface:ISessionGet a session variable. -
get
Description copied from interface:ISessionGet a session variable or the specified fallback value. -
put
Description copied from interface:ISessionSet a session variable. -
remove
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
Description copied from interface:ISessionGet the unique session identifier. -
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
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
Description copied from interface:ISessionGet a set that contains all session variable names. -
getKeySet
-
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.
-
iterator
-
getProperty
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject
-
getAt
-
putAt
-