|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
de.uplanet.lucy.server.portalserver.GroovySession
@Scriptable public final class GroovySession
Field Summary |
---|
Fields inherited from interface de.uplanet.lucy.server.session.ISession |
---|
DEFAULT_TIMEOUT |
Constructor Summary | |
---|---|
GroovySession(Session p_session)
|
Method Summary | |
---|---|
void |
addListener(de.uplanet.lucy.server.session.ISessionListener p_listener,
boolean p_bWeak)
Add a listener for session events. |
boolean |
containsKey(java.lang.String p_strKey)
Test if a certain session variable exists. |
java.lang.Object |
get(java.lang.String p_strKey)
Get a session variable. |
java.lang.Object |
get(java.lang.String p_strKey,
java.lang.Object p_objFallback)
Get a session variable or the specified fallback value. |
java.lang.Object |
getAt(java.lang.String p_strKey)
|
java.lang.String |
getAuthConfigName()
|
long |
getCreationTime()
Get the time when this session was created. |
java.lang.String |
getId()
Get the unique session identifier. |
java.util.Set<java.lang.String> |
getKeySet()
|
long |
getLastAccessTime()
Get the time of the last access to this session. |
java.lang.Object |
getProperty(java.lang.String p_strKey)
|
javax.security.auth.Subject |
getSubject()
Get the subject that is associated with this session. |
long |
getTimeout()
Get the session timeout. |
IUser |
getUser()
Get the user that is associated with the session. |
boolean |
isAnonymous()
Determine if the session is an anonymous session. |
boolean |
isLoggedOut()
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. |
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
iterator()
|
java.util.Set<java.lang.String> |
keySet()
Get a set that contains all session variable names. |
void |
logout()
Performs a logout on this session. |
void |
put(java.lang.String p_strKey,
java.lang.Object p_objValue)
Set a session variable. |
void |
putAt(java.lang.String p_strKey,
java.lang.Object p_value)
|
void |
remove(java.lang.String p_strKey)
Remove a session variable. |
void |
setProperty(java.lang.String p_strKey,
java.lang.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, invokeMethod, setMetaClass |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroovySession(Session p_session)
Method Detail |
---|
public java.lang.String getAuthConfigName()
public boolean containsKey(java.lang.String p_strKey)
ISession
containsKey
in interface ISession
p_strKey
- The name of the session variable.public java.lang.Object get(java.lang.String p_strKey)
ISession
get
in interface ISession
p_strKey
- The name of the session variable.
public java.lang.Object get(java.lang.String p_strKey, java.lang.Object p_objFallback)
ISession
get
in interface ISession
p_strKey
- The name of the session variable.p_objFallback
- The fallback value that's being
used if the session variable does not exist.
public void put(java.lang.String p_strKey, java.lang.Object p_objValue)
ISession
put
in interface ISession
p_strKey
- The name of the session variable.p_objValue
- The value of the session variable.public void remove(java.lang.String p_strKey)
ISession
remove
in interface ISession
p_strKey
- The name of the session variable to be removed.public long getCreationTime()
ISession
getCreationTime
in interface ISession
public java.lang.String getId()
ISession
getId
in interface ISession
public javax.security.auth.Subject getSubject()
ISession
getSubject
in interface ISession
public long getTimeout()
ISession
getTimeout
in interface ISession
public IUser getUser()
ISession
getUser
in interface ISession
null
.public boolean isAnonymous()
ISession
isAnonymous
in interface ISession
true
if the session is anonymous, false
otherwise.public boolean isLoggedOut()
ISession
isLoggedOut
in interface ISession
true
is the session is logged out,
or false
otherwise.public long getLastAccessTime()
ISession
getLastAccessTime
in interface ISession
public boolean isStale()
ISession
The natural implementation of this method will return
isStale(System.currentTimeMillis())
.
isStale
in interface ISession
true
if the session already has timed out,
false
otherwise.public boolean isStale(long p_lTimeNow)
ISession
isStale
in interface ISession
true
if the session has timed out,
false
otherwise.public java.util.Set<java.lang.String> keySet()
ISession
keySet
in interface ISession
public java.util.Set<java.lang.String> getKeySet()
public void logout()
ISession
logout
in interface ISession
public void setTimeout(long p_lTimeout)
ISession
setTimeout
in interface ISession
p_lTimeout
- The timeout in milliseconds.public void touch()
ISession
touch
in interface ISession
public void addListener(de.uplanet.lucy.server.session.ISessionListener p_listener, boolean p_bWeak)
ISession
addListener
in interface ISession
p_listener
- The session listener to add.p_bWeak
- true
if the listener should
be weakly referenced, false
otherwise.public java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> iterator()
public java.lang.Object getProperty(java.lang.String p_strKey)
getProperty
in interface groovy.lang.GroovyObject
getProperty
in class groovy.lang.GroovyObjectSupport
public void setProperty(java.lang.String p_strKey, java.lang.Object p_value)
setProperty
in interface groovy.lang.GroovyObject
setProperty
in class groovy.lang.GroovyObjectSupport
public java.lang.Object getAt(java.lang.String p_strKey)
public void putAt(java.lang.String p_strKey, java.lang.Object p_value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |