public class TurbineSessionService extends TurbineBaseService implements SessionService
web.xml
deployement descriptor as follows:
<listener>
<listener-class>
org.apache.turbine.session.SessionListener
</listener-class>
</listener>
TurbineSession,
SessionListenerconfiguration, name, serviceBrokerinitableBroker, isInitializedSERVICE_NAME| Constructor and Description |
|---|
TurbineSessionService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(HttpSession session)
Adds a session to the current list.
|
Collection<HttpSession> |
getActiveSessions()
Gets a list of the active sessions.
|
Collection<User> |
getActiveUsers()
Gets a collection of all user objects representing the users currently
logged in.
|
HttpSession |
getSession(String sessionId)
Gets the HttpSession by the session identifier
|
Collection<HttpSession> |
getSessionsForUser(User user)
Get a collection of all session on which the given user
is logged in.
|
User |
getUserFromSession(HttpSession session)
Gets the User object of the the specified HttpSession.
|
void |
init()
Initializes the service
|
boolean |
isUserLoggedIn(User user)
Determines if a given user is currently logged in.
|
void |
removeSession(HttpSession session)
Removes a session from the current list.
|
void |
shutdown()
Returns to uninitialized state.
|
init, initgetConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBrokergetInit, getInitableBroker, setInit, setInitableBrokerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getName, getProperties, setName, setServiceBrokergetInit, init, setInitableBrokerpublic TurbineSessionService()
public Collection<HttpSession> getActiveSessions()
getActiveSessions in interface SessionServiceHttpSession objects.public void addSession(HttpSession session)
addSession in interface SessionServicesession - Session to addpublic void removeSession(HttpSession session)
removeSession in interface SessionServicesession - Session to removepublic boolean isUserLoggedIn(User user)
isUserLoggedIn in interface SessionServiceuser - User to check forpublic Collection<User> getActiveUsers()
getActiveUsers in interface SessionServiceUser objects.public User getUserFromSession(HttpSession session)
getUserFromSession in interface SessionServicesession - The session from which to extract a user.public HttpSession getSession(String sessionId)
getSession in interface SessionServicesessionId - The unique session identifier.public Collection<HttpSession> getSessionsForUser(User user)
getSessionsForUser in interface SessionServiceuser - the userpublic void init()
init in interface Initableinit in class TurbineBaseServicepublic void shutdown()
shutdown in interface Initableshutdown in class TurbineBaseServiceCopyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.