|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectblather.model.SessionDB
public class SessionDB
SessionDB models a database of all current user sessions. It keeps provides a method to log a user in (generating a new session ID), a method to check if a session
| Constructor Summary | |
|---|---|
SessionDB()
|
|
| Method Summary | |
|---|---|
boolean |
isSessionValid(java.lang.String sessionKey)
Returns true if sessionKey corresponds to a valid session, false otherwise. |
java.lang.String |
login(BlatherUserInterface u)
|
void |
logout(java.lang.String sessionKey)
Removes the session with the given key from the database, logging this user out. |
BlatherUserInterface |
userForSession(java.lang.String sessionKey)
Returns the BlatherUser associated with a given session key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionDB()
| Method Detail |
|---|
public BlatherUserInterface userForSession(java.lang.String sessionKey)
sessionKey - a session key string
public boolean isSessionValid(java.lang.String sessionKey)
sessionKey - a session key string
public void logout(java.lang.String sessionKey)
sessionKey - a session key stringpublic java.lang.String login(BlatherUserInterface u)
u - a BlatherUserInterface reference, corresponding to the active user for this session
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||