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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(de.uplanet.lucy.server.session.ISessionListener p_listener, boolean p_bWeak) Add a listener for session events.boolean
containsKey
(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.long
Get the time when this session was created.getId()
Get the unique session identifier.long
Get the time of the last access to this session.getProperty
(String p_strKey) Get the subject that is associated with this session.long
Get the session timeout.getUser()
Get the user that is associated with the session.boolean
Determine if the session is an anonymous session.boolean
Check if the session is logged out.boolean
isStale()
Check if the session has timed out.boolean
isStale
(long p_lTimeNow) Test if the session has timed out.iterator()
keySet()
Get a set that contains all session variable names.void
logout()
Performs a logout on this session.void
Set a session variable.void
void
Remove a session variable.void
setProperty
(String p_strKey, Object p_value) void
setTimeout
(long p_lTimeout) Set the session timeout.void
touch()
Touch the session.Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface groovy.lang.GroovyObject
invokeMethod
-
Constructor Details
-
GroovySession
-
-
Method Details
-
getAuthConfigName
Description copied from interface:ISession
Get the name of the authentication configuration used to login this session.- Specified by:
getAuthConfigName
in interfaceISession
- Returns:
- The name of the authentication configuration.
-
containsKey
Description copied from interface:ISession
Test if a certain session variable exists.- Specified by:
containsKey
in interfaceISession
- Parameters:
p_strKey
- The name of the session variable.
-
get
Description copied from interface:ISession
Get a session variable. -
get
Description copied from interface:ISession
Get a session variable or the specified fallback value. -
put
Description copied from interface:ISession
Set a session variable. -
remove
Description copied from interface:ISession
Remove a session variable. -
getCreationTime
public long getCreationTime()Description copied from interface:ISession
Get the time when this session was created.- Specified by:
getCreationTime
in 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:ISession
Get the unique session identifier. -
getSubject
Description copied from interface:ISession
Get the subject that is associated with this session.- Specified by:
getSubject
in interfaceISession
- Returns:
- The associated subject.
-
getTimeout
public long getTimeout()Description copied from interface:ISession
Get the session timeout.- Specified by:
getTimeout
in interfaceISession
- Returns:
- p_lTimeout The timeout in milliseconds.
-
getUser
Description copied from interface:ISession
Get the user that is associated with the session. -
isAnonymous
public boolean isAnonymous()Description copied from interface:ISession
Determine if the session is an anonymous session.- Specified by:
isAnonymous
in interfaceISession
- Returns:
true
if the session is anonymous,false
otherwise.
-
isLoggedOut
public boolean isLoggedOut()Description copied from interface:ISession
Check if the session is logged out.- Specified by:
isLoggedOut
in interfaceISession
- Returns:
true
is the session is logged out, orfalse
otherwise.
-
getLastAccessTime
public long getLastAccessTime()Description copied from interface:ISession
Get the time of the last access to this session.- Specified by:
getLastAccessTime
in interfaceISession
- Returns:
- The time of last access.
-
isStale
public boolean isStale()Description copied from interface:ISession
Check 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:ISession
Test if the session has timed out. -
keySet
Description copied from interface:ISession
Get a set that contains all session variable names. -
getKeySet
-
logout
public void logout()Description copied from interface:ISession
Performs a logout on this session. -
setTimeout
public void setTimeout(long p_lTimeout) Description copied from interface:ISession
Set the session timeout.- Specified by:
setTimeout
in interfaceISession
- Parameters:
p_lTimeout
- The timeout in milliseconds.
-
touch
public void touch()Description copied from interface:ISession
Touch the session. -
addListener
public void addListener(de.uplanet.lucy.server.session.ISessionListener p_listener, boolean p_bWeak) Description copied from interface:ISession
Add a listener for session events.- Specified by:
addListener
in interfaceISession
- Parameters:
p_listener
- The session listener to add.p_bWeak
-true
if the listener should be weakly referenced,false
otherwise.
-
iterator
-
getProperty
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getAt
-
putAt
-