public interface SessionService extends Service
SessionListener
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME
The key under which this service is stored in TurbineServices.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getConfiguration, getName, getProperties, setName, setServiceBroker
static final String SERVICE_NAME
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 forCollection<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 userCopyright © 2000–2018 The Apache Software Foundation. All rights reserved.