5a53bd261df16c1247262fa04632bfdc6494a77e
[vamsas.git] / src / org / vamsas / client / SimpleClientFactory.java
1 package org.vamsas.client;
2 /**
3  * TODO document type SimpleClientFactory
4  * @author jimp
5  *
6  */
7 public class SimpleClientFactory implements IClientFactory {
8   static SimpleClientFactory singleton = null;
9
10   static private void CreateClientFactory() {
11     if (singleton != null) {
12
13     } else {
14       // Create singleton class.
15
16     }
17   }
18   /**
19    * Create a client factory that works with sessions at the given
20    * path.
21    * @param path
22    */
23   public SimpleClientFactory(String path) {
24     // Check path is valid and read/writeable.
25     // make housekeeping files...
26   }
27   /* (non-Javadoc)
28    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle)
29    */
30   public IClient getIClient(ClientHandle applicationHandle) {
31     // create a new session
32     // register new ClientHandle in session
33     // create Client instance
34     return null;
35   }
36
37   /* (non-Javadoc)
38    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, java.lang.String)
39    */
40   public IClient getIClient(ClientHandle applicationHandle, String sessionUrn) {
41     // locate session from Urn
42     // check that clientHandle is unique (with default user) - if not update the clientHandle urn to make it unique.
43     // wait for lock and attach to session
44     // create Client instance
45     return null;
46   }
47
48   /* (non-Javadoc)
49    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle, java.lang.String)
50    */
51   public IClient getIClient(ClientHandle applicationHandle, UserHandle userId,
52       String sessionUrn) {
53     // locate session from Urn
54     // check Uniqueness of user + ClientHandle in the session. Update clientHandle urn accordingly.
55     // wait for lock, attach to session
56     // create client instance
57     return null;
58   }
59
60   /* (non-Javadoc)
61    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle)
62    */
63   public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) {
64     // create new session
65     // register Client and UserHandles in session
66     // create client instance
67     return null;
68   }
69
70   public static void main(String[] args) {
71   }
72 }