added simple semaphore file mechanism for session directory.
[vamsas.git] / src / org / vamsas / client / simpleclient / SimpleClientFactory.java
index c6d1687..d3148d7 100644 (file)
@@ -8,6 +8,7 @@ import org.apache.commons.logging.LogFactory;
 import org.vamsas.client.ClientHandle;
 import org.vamsas.client.IClient;
 import org.vamsas.client.IClientFactory;
+import org.vamsas.client.NoDefaultSessionException;
 import org.vamsas.client.UserHandle;
 
 /**
@@ -42,10 +43,18 @@ public class SimpleClientFactory implements IClientFactory {
       throw(new IOException("Cannot read and write to a directory called "+path));
     }
   }
+  
+  /* (non-Javadoc)
+   * @see org.vamsas.client.IClientFactory#getCurrentSessions()
+   */
+  public String[] getCurrentSessions() {
+    // TODO look in the arena and enumerate session handles for return.
+    return new String[] {};
+  }
   /* (non-Javadoc)
    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle)
    */
-  public IClient getIClient(ClientHandle applicationHandle) {
+  public IClient getIClient(ClientHandle applicationHandle) throws NoDefaultSessionException {
     // create a new session
     // register new ClientHandle in session
     // create SimpleClient instance
@@ -78,7 +87,7 @@ public class SimpleClientFactory implements IClientFactory {
   /* (non-Javadoc)
    * @see org.vamsas.client.IClientFactory#getIClient(org.vamsas.client.ClientHandle, org.vamsas.client.UserHandle)
    */
-  public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) {
+  public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) throws NoDefaultSessionException {
     // create new session
     // register SimpleClient and UserHandles in session
     // create client instance