|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectuk.ac.vamsas.client.simpleclient.SessionFile
uk.ac.vamsas.client.simpleclient.ListFile
uk.ac.vamsas.client.simpleclient.SessionsFile
| Field Summary |
| Fields inherited from class uk.ac.vamsas.client.simpleclient.SessionFile |
fileLock, sessionFile |
| Constructor Summary | |
SessionsFile(java.io.File file)
|
|
| Method Summary | |
protected int |
addSession(SessionHandle session,
boolean disambiguate)
Adds a SessionHandle to the SessionList file - optionally disambiguating the SessionHandle (modifes the URN). |
int |
addSession(SessionHandle newSession,
boolean disambig,
Lock extantLock)
adds SessionsHandle me to the sessionsList under an existing lock. |
int |
addSession(SessionHandle newSession,
Lock extantLock)
adds SessionHandle me to the sessionList under an existing lock extantLock. |
void |
clearList()
|
protected boolean |
putSessionsList(SessionHandle[] clients)
safely writes sessions array to the file referred to by sessionFile. |
void |
removeSession(SessionHandle session,
Lock sessionlock)
removes the current session from the SessionsList without complaint if the session isn't in the sessionsList already. |
SessionHandle[] |
retrieveSessionsList()
get the SessionsList from the file. |
SessionHandle[] |
retrieveSessionsList(Lock extantlock)
get list from the locked SessionsList. |
| Methods inherited from class uk.ac.vamsas.client.simpleclient.SessionFile |
backupSessionFile, backupSessionFile, eraseExistence, getBufferedInputStream, getBufferedOutputStream, getFileInputStream, getFileOutputStream, lockFile, lockFile, unlockFile, updateFrom |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SessionsFile(java.io.File file)
throws java.io.IOException
file - | Method Detail |
public SessionHandle[] retrieveSessionsList()
public SessionHandle[] retrieveSessionsList(Lock extantlock)
extantlock -
public int addSession(SessionHandle newSession,
Lock extantLock)
newSession - extantLock -
public int addSession(SessionHandle newSession,
boolean disambig,
Lock extantLock)
newSession - - sessionsHandledisambig - - if true then add will fail if an identical sessionHandle already
existsextantLock - - existing lock
public void removeSession(SessionHandle session,
Lock sessionlock)
session - session handle to be removedsessionlock - existing lock passed from watcher.
protected int addSession(SessionHandle session,
boolean disambiguate)
session - disambiguate - - flag indicating if the URN for me should be disambiguated to
differentiate between sessions.
protected boolean putSessionsList(SessionHandle[] clients)
clients -
public void clearList()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||