|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.gui.sessions.SessionManager
public class SessionManager
SessionManager is a simple singleton design pattern that keeps it own static reference. Stores a list of sessions, can load and save those sessions, and allows addition and deletion of sessions.
Field Summary | |
---|---|
GuiObservable |
currentSessionChanged
|
static SessionManager |
theManager
|
Constructor Summary | |
---|---|
SessionManager(File sessionsDir)
|
Method Summary | |
---|---|
void |
addSession(Session session)
Add a session to the manager |
void |
clear()
Clear all sessions from the manager. |
Session |
getCurrentSession()
Returns the session currently being examined by Frysk. |
Session |
getSessionByName(String name)
Returns a session object via the name of the session |
ObservableLinkedList |
getSessions()
Returns a list of all sessions the manager has knowledge about. |
void |
load()
|
boolean |
nameIsUsed(String name)
Determine if there already is a session in the manager via the name of that session. |
void |
removeSession(Session session)
Remove a session from the manager. |
void |
renameSession(Session session,
String newName)
|
void |
save()
|
void |
setCurrentSession(Session session)
Sets the session that is to be currently examined by frysk. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static SessionManager theManager
public final GuiObservable currentSessionChanged
Constructor Detail |
---|
public SessionManager(File sessionsDir)
Method Detail |
---|
public void addSession(Session session)
session
- - the session to be added.public void clear()
public Session getSessionByName(String name)
name
- - the name of the session to lookup
public ObservableLinkedList getSessions()
public boolean nameIsUsed(String name)
name
- - the name of that session.
public void removeSession(Session session)
session
- - the session object to remove.public void renameSession(Session session, String newName)
public void setCurrentSession(Session session)
session
- public Session getCurrentSession()
public void save()
public void load()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |