2 * Created on 13-Sep-2005
4 * TODO To change the template for this generated file go to
5 * Window - Preferences - Java - Code Style - Code Templates
7 package uk.ac.vamsas.client;
10 * Defines methods for instantiating Vorba client application agents
13 * (it's VORBA, not CORBA!)
16 public interface IClientFactory {
19 * Create a new Vorba Session
20 * @param applicationHandle is the application's VAMSAS handle string
21 * @throws NoDefaultSessionException if more than one session exists that the client may connect to
23 IClient getIClient(ClientHandle applicationHandle) throws NoDefaultSessionException;
25 * returns new Vorba for a given session.
26 * @param applicationHandle
27 * @param sessionUrn session to connect to (or null to create a new session)
30 IClient getIClient(ClientHandle applicationHandle, String sessionUrn);
32 * returns new vorba for a given session acting as a particular identity
33 * @param applicationHandle
35 * @param sessionUrn session to connect to (or null to create a new session)
38 IClient getIClient(ClientHandle applicationHandle, UserHandle userId, String sessionUrn);
40 * New session for application and specific user
41 * @param applicationHandle
44 * @throws NoDefaultSessionException if more than one session exists that the client may connect to
46 IClient getIClient(ClientHandle applicationHandle, UserHandle userId) throws NoDefaultSessionException;
49 * enumerate the active sessions this IClientFactory instance knows about.
50 * Can be used by caller to pick a session on catching a NoDefaultSessionException.
51 * LATER: Define interface for discovering more information about a session (so it can be presented to a user in a meaningful way)
52 * @return possibly empty array of sessionUrn strings
54 public String[] getCurrentSessions();