|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.session.SessionTool
A pull tool for accessing the SessionService from a velocity template.
Constructor Summary | |
SessionTool()
|
Method Summary | |
void |
addSession(javax.servlet.http.HttpSession session)
Adds a session to the current list. |
java.util.Collection |
getActiveSessions()
Gets a list of the active sessions |
java.util.Collection |
getActiveUsers()
Gets a collection of all user objects representing the users currently logged in. |
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. |
void |
init(java.lang.Object o)
Initialize the application tool. |
boolean |
isUserLoggedIn(User user)
Determines if a given user is currently logged in. |
void |
refresh()
Refresh the application tool. |
void |
removeSession(javax.servlet.http.HttpSession session)
Removes a session from the current list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SessionTool()
Method Detail |
public void init(java.lang.Object o)
ApplicationTool
It is possible that session scope tools will be initialized with a null
User
object. This happens when the first request on a
session happens to the be login action.
If your session tool depends on having a User
object, you
should look at implementing the RunDataApplicationTool
interface
instead.
init
in interface ApplicationTool
o
- initialization datapublic void refresh()
ApplicationTool
refresh
in interface ApplicationTool
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
-
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 |