1 package org.vamsas.client;
3 * TODO document type SimpleClientFactory
7 public class SimpleClientFactory implements IClientFactory {
8 static SimpleClientFactory singleton = null;
10 static private void CreateClientFactory() {
11 if (singleton != null) {
14 // Create singleton class.
19 * Create a client factory that works with sessions at the given
23 public SimpleClientFactory(String path) {
24 // Check path is valid and read/writeable.
25 // make housekeeping files...
28 * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle)
30 public IClient getIClient(ClientHandle applicationHandle) {
31 // create a new session
32 // register new ClientHandle in session
33 // create Client instance
38 * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, java.lang.String)
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
49 * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle, java.lang.String)
51 public IClient getIClient(ClientHandle applicationHandle, UserHandle userId,
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
61 * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle)
63 public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) {
65 // register Client and UserHandles in session
66 // create client instance
70 public static void main(String[] args) {