small updates.
[vamsas.git] / src / org / vamsas / client / simpleclient / VamsasSession.java
1 package org.vamsas.client.simpleclient;
2
3 import java.io.File;
4 /**
5  * 
6  * Vamsas client is intialised with a path to create live session directories. 
7  * This path may contain a vamsas.properties file 
8  * that sets additional parameters (otherwise client 
9  * just uses the one on the classpath).
10  * 
11  * A vamsas session consists of :
12  *  SessionDir - translates to urn of a live session.
13  *  Contains: Vamsas Document (as a jar), Session client list file, 
14  *  both of which may be locked, and additional 
15  *  temporary versions of these files when write 
16  *  operations are taking place.
17  * 
18  * Zip file entries
19  *  - vamsasdocument.xml : core info
20  *  one or more:
21  *  - <applicationname>.version.sessionnumber.raw (string given in vamsasdocument.xml applicationData entry)
22  *  
23  * Lockfile
24  *  - filename given in the vamsasdocument.xml. Should be checked for validity by any client and rewritten if necessary. 
25  *    The lockfile can point to the jar itself.
26  * Mode of operation.
27  * Initially - documentHandler either:
28  *  - creates a zip for a new session for the client
29  *  - connect to an existing session zip 
30  *   1. reads session urn file
31  *   2. waits for lock
32  *   3. examines session - decide whether to create new application data slice or connect to one stored in session.
33  *   4. writes info into session file
34  *   5. releases lock and generates local client events.
35  *   6. Creates Watcher thread to generate events.
36  * 
37  * During the session
38  *  - Update watcher checks for file change - 
39  * 
40  */
41
42 public class VamsasSession {
43   /**
44    * Holds the file handlers for a session.
45    */
46   File sessionDir;
47   ClientsFile clist;
48   File vamArchive;
49   
50   
51 }