adding various state flags for events
[vamsas.git] / src / org / vamsas / client / IClientFactory.java
index 5f203ef..564782a 100644 (file)
@@ -18,8 +18,9 @@ public interface IClientFactory {
      /**
       * Create a new Vorba Session
       * @param applicationHandle is the application's VAMSAS handle string
+     * @throws NoDefaultSessionException if more than one session exists that the client may connect to
       */
-       IClient getIClient(ClientHandle applicationHandle);
+       IClient getIClient(ClientHandle applicationHandle) throws NoDefaultSessionException;
        /**
         * returns new Vorba for a given session.
         * @param applicationHandle
@@ -40,8 +41,16 @@ public interface IClientFactory {
         * @param applicationHandle
         * @param userId
         * @return
+       * @throws NoDefaultSessionException if more than one session exists that the client may connect to
         */
-       IClient getIClient(ClientHandle applicationHandle, UserHandle userId);
+       IClient getIClient(ClientHandle applicationHandle, UserHandle userId) throws NoDefaultSessionException;
        
+       /**
+        * enumerate the active sessions this IClientFactory instance knows about.
+        * Can be used by caller to pick a session on catching a NoDefaultSessionException.
+        * LATER: Define interface for discovering more information about a session (so it can be presented to a user in a meaningful way)
+        * @return possibly empty array of sessionUrn strings
+        */
+       public String[] getCurrentSessions();
 
 }