| |
|
| java.lang.Object org.apache.turbine.services.session.SessionTool
SessionTool | public class SessionTool implements ApplicationTool(Code) | | A pull tool for accessing the SessionService from a velocity template.
author: Quinton McCombs version: $Id: SessionTool.java 534527 2007-05-02 16:10:59Z tv $ |
addSession | public void addSession(HttpSession session)(Code) | | Adds a session to the current list. This method should only be
called by the listener.
Parameters: session - Session to add |
getActiveSessions | public Collection getActiveSessions()(Code) | | Gets a list of the active sessions
List of HttpSession objects |
getActiveUsers | public Collection getActiveUsers()(Code) | | Gets a collection of all user objects representing the users currently
logged in. This will exclude any instances of anonymous user that
Turbine will use before the user actually logs on.
collection of org.apache.turbine.om.security.User objects |
getSessionsForUser | public Collection getSessionsForUser(User user)(Code) | | Get a collection of all session on which the given user
is logged in.
Parameters: user - the user Collection of HtttSession objects |
getUserFromSession | public User getUserFromSession(HttpSession session)(Code) | | Gets the User object of the the specified HttpSession.
Parameters: session - |
isUserLoggedIn | public boolean isUserLoggedIn(User user)(Code) | | Determines if a given user is currently logged in. The actual
implementation of the User object must implement the equals()
method. By default, Torque based objects (liek TurbineUser)
have an implementation of equals() that will compare the
result of getPrimaryKey().
Parameters: user - User to check for true if the user is logged in on one of theactive sessions. |
refresh | public void refresh()(Code) | | |
removeSession | public void removeSession(HttpSession session)(Code) | | Removes a session from the current list. This method should only be
called by the listener.
Parameters: session - Session to remove |
|
|
|