|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionService
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 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. |
Collection<javax.servlet.http.HttpSession> |
getActiveSessions()
Gets all active sessions |
Collection<User> |
getActiveUsers()
Gets a collection of all user objects representing the users currently logged in. |
javax.servlet.http.HttpSession |
getSession(String sessionId)
Gets the HttpSession by the session identifier |
Collection<javax.servlet.http.HttpSession> |
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 |
---|
static final String SERVICE_NAME
Method Detail |
---|
Collection<javax.servlet.http.HttpSession> getActiveSessions()
void addSession(javax.servlet.http.HttpSession session)
session
- Session to addvoid removeSession(javax.servlet.http.HttpSession session)
session
- Session to removeboolean isUserLoggedIn(User user)
user
- User to check for
Collection<User> getActiveUsers()
User getUserFromSession(javax.servlet.http.HttpSession session)
session
- The session from which to extract a user.
javax.servlet.http.HttpSession getSession(String sessionId)
sessionId
- The unique session identifier.
Collection<javax.servlet.http.HttpSession> getSessionsForUser(User user)
user
- the user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |