package org.vamsas.client; /** * TODO document type SimpleClientFactory * @author jimp * */ public class SimpleClientFactory implements IClientFactory { static SimpleClientFactory singleton = null; static private void CreateClientFactory() { if (singleton != null) { } else { // Create singleton class. } } /** * Create a client factory that works with sessions at the given * path. * @param path */ public SimpleClientFactory(String path) { // Check path is valid and read/writeable. // make housekeeping files... } /* (non-Javadoc) * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle) */ public IClient getIClient(ClientHandle applicationHandle) { // create a new session // register new ClientHandle in session // create Client instance return null; } /* (non-Javadoc) * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, java.lang.String) */ public IClient getIClient(ClientHandle applicationHandle, String sessionUrn) { // locate session from Urn // check that clientHandle is unique (with default user) - if not update the clientHandle urn to make it unique. // wait for lock and attach to session // create Client instance return null; } /* (non-Javadoc) * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle, java.lang.String) */ public IClient getIClient(ClientHandle applicationHandle, UserHandle userId, String sessionUrn) { // locate session from Urn // check Uniqueness of user + ClientHandle in the session. Update clientHandle urn accordingly. // wait for lock, attach to session // create client instance return null; } /* (non-Javadoc) * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle) */ public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) { // create new session // register Client and UserHandles in session // create client instance return null; } public static void main(String[] args) { } }