|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.SessionBase
A SessionBase contains a hashtable where Sessions for the users belonging to a Director is added. The class contains methods for adding, retrieving updating and removing Sessions from the base. It also has a method that returns a list of all the Sessions in the base in the form of an Item.
Field Summary | |
private java.util.Hashtable |
ht
A hashtable where all the Sessions are put. |
Constructor Summary | |
SessionBase()
Creates a new SessionBase. |
Method Summary | |
void |
addSession(Session session)
Adds the specified Session to the SessionBase. |
java.util.ArrayList |
getAllSessions()
Returns an ArrayList with all the Session-objects in the SessionBase added to it. |
Session |
getSession(java.lang.String username)
Returns the Session with the specified username. |
Item |
listSessions()
Returns all the Sessions in the SessionBase in the form of an Item. |
void |
removeSession(java.lang.String username)
Removes the Session with the specified username from the SessionBase. |
boolean |
sessionExists(java.lang.String username)
Searches through the SessionBase to determine if there exists a Session with a username equal to the specified username. |
void |
updateSession(Session session)
Updates the Session with the specified Session's username by removing the current Session and adding itself to the base with the same username. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Hashtable ht
Constructor Detail |
public SessionBase()
Method Detail |
public void addSession(Session session)
session
- The Session to be added.public Session getSession(java.lang.String username)
username
- The username of the Session to be returned.public java.util.ArrayList getAllSessions()
public Item listSessions()
public void removeSession(java.lang.String username)
username
- The username specifying the Session to be removed.public boolean sessionExists(java.lang.String username)
username
- The username of the Session to search for.public void updateSession(Session session)
session
- The Session to be added to update an existing Session.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |