|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.session.SessionInfo
public class SessionInfo
It gathers information about an opened session of a user.
Field Summary | |
---|---|
static SessionInfo |
AnonymousSession
|
static SessionInfo |
NoneSession
|
Constructor Summary | |
---|---|
SessionInfo(String sessionId,
UserDetail user)
Constructs a new instance about a given opened user session. |
Method Summary | ||
---|---|---|
|
getAttribute(String name)
Gets the value of the attribute named by the specified name. |
|
InMemoryCacheService |
getCache()
Provides a cache associated to the current session. |
|
String |
getIPAddress()
Gets the IP address of the remote client that opened the session. |
|
long |
getLastAccessTimestamp()
Gets the timestamp of the last access by the client behind this session. |
|
long |
getLastIdleDuration()
Gets the last duration of its idle time. |
|
long |
getOpeningTimestamp()
Gets the timestamp at which the session with Silverpeas was opened. |
|
String |
getSessionId()
Gets the unique identifier of the session. |
|
UserDetail |
getUserDetail()
Gets the profile of the user that opened the session. |
|
boolean |
isDefined()
Is this session is defined? |
|
void |
onClosed()
Frees the allocated resources used in the session management and carried by this session information. |
|
void |
setAsIdle()
Sets this session as currently idle. |
|
|
setAttribute(String name,
T value)
Sets an attribute named by the specified name with the specified value. |
|
void |
setIPAddress(String ip)
Sets the IP address of the remote client that requests a session opening with Silverpeas. |
|
void |
unsetAttribute(String name)
Unsets the specified attribute. |
|
void |
updateLastAccess()
Updates the last access timestamp. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final SessionInfo NoneSession
public static final SessionInfo AnonymousSession
Constructor Detail |
---|
public SessionInfo(String sessionId, UserDetail user)
sessionId
- the identifier of the opened session.user
- the user for which a session was opened.Method Detail |
---|
public void setIPAddress(String ip)
ip
- the IP address of the remote client.public String getIPAddress()
public long getLastAccessTimestamp()
public long getOpeningTimestamp()
public long getLastIdleDuration()
public void setAsIdle()
public String getSessionId()
public UserDetail getUserDetail()
public void updateLastAccess()
public <T> void setAttribute(String name, T value)
T
- the type of the attribute value.name
- the name of the attribute to set.value
- the value of the attribute to set.public <T> T getAttribute(String name)
T
- the type of the attribute value.name
- the name of the attribute to get.
public void unsetAttribute(String name)
name
- the name of the attibute to unset.public void onClosed()
public boolean isDefined()
public InMemoryCacheService getCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |