|
|||||||||||
| 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.ClientsFile
Handler for the clientsFile within a vamsas session thread.
| Field Summary |
| Fields inherited from class uk.ac.vamsas.client.simpleclient.SessionFile |
fileLock, sessionFile |
| Constructor Summary | |
ClientsFile(java.io.File filelist)
|
|
| Method Summary | |
int |
addClient(ClientHandle me)
adds the ClientHandle to the list - if it is not unique, then the ClientHandle object is modified to make it unique in the list. |
protected int |
addClient(ClientHandle me,
boolean disambiguate)
Adds a ClientHandle to the ClientList file - optionally disambiguating the ClientHandle (modifes the URN). |
int |
addClient(ClientHandle me,
boolean disambig,
Lock extantLock)
adds clientHandle me to the clientList under an existing lock. |
int |
addClient(ClientHandle me,
Lock extantLock)
adds clientHandle me to the clientList under an existing lock extantLock. |
void |
clearList()
|
protected boolean |
putClientList(ClientHandle[] clients)
safely writes clients array to the file referred to by sessionFile. |
void |
removeClient(ClientHandle me,
Lock clientlock)
removes 'me' from the session ClientList without complaint if 'me' isn't in the clientList already. |
ClientHandle[] |
retrieveClientList()
get the clientList from the file. |
ClientHandle[] |
retrieveClientList(Lock extantlock)
get list from the locked ClientList. |
| 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 ClientsFile(java.io.File filelist)
throws java.io.IOException
| Method Detail |
public ClientHandle[] retrieveClientList()
public ClientHandle[] retrieveClientList(Lock extantlock)
extantlock -
public int addClient(ClientHandle me,
Lock extantLock)
me - extantLock -
public int addClient(ClientHandle me,
boolean disambig,
Lock extantLock)
me - - clientHandledisambig - - if true then add will fail if an identical clientHandle already
existsextantLock - - existing lock
public int addClient(ClientHandle me)
me -
public void removeClient(ClientHandle me,
Lock clientlock)
me - client handle to be removedclientlock - existing lock passed from watcher.
protected int addClient(ClientHandle me,
boolean disambiguate)
me - disambiguate - - flag indicating if the URN for me should be disambiguated to
differentiate between sessions.
protected boolean putClientList(ClientHandle[] clients)
clients -
public void clearList()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||