|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The SessionService allows access to the current sessions of the current context. The session objects that are cached by this service are obtained through a listener. The listener must be configured in your web.xml file.
SessionListener
Field Summary | |
static java.lang.String |
SERVICE_NAME
The key under which this service is stored in TurbineServices. |
Method Summary | |
void |
addSession(javax.servlet.http.HttpSession session)
Adds a session to the current list. |
java.util.Collection |
getActiveSessions()
Gets all active sessions |
java.util.Collection |
getActiveUsers()
Gets a collection of all user objects representing the users currently logged in. |
javax.servlet.http.HttpSession |
getSession(java.lang.String sessionId)
Gets the HttpSession by the session identifier |
java.util.Collection |
getSessionsForUser(User user)
Get a collection of all session on which the given user is logged in. |
User |
getUserFromSession(javax.servlet.http.HttpSession session)
Gets the User object of the the specified HttpSession. |
boolean |
isUserLoggedIn(User user)
Determines if a given user is currently logged in. |
void |
removeSession(javax.servlet.http.HttpSession session)
Removes a session from the current list. |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public java.util.Collection getActiveSessions()
public void addSession(javax.servlet.http.HttpSession session)
session
- Session to addpublic void removeSession(javax.servlet.http.HttpSession session)
session
- Session to removepublic boolean isUserLoggedIn(User user)
user
- User to check for
public java.util.Collection getActiveUsers()
public User getUserFromSession(javax.servlet.http.HttpSession session)
session
- The session from which to extract a user.
public javax.servlet.http.HttpSession getSession(java.lang.String sessionId)
sessionId
- The unique session identifier.
public java.util.Collection getSessionsForUser(User user)
user
- the user
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |