private static uk.ac.vamsas.client.IClientFactory getClientFactory() throws IOException {
return new uk.ac.vamsas.client.simpleclient.SimpleClientFactory();
}
+ /**
+ * Start a new vamsas session
+ * @param jdesktop
+ */
public VamsasApplication(Desktop jdesktop)
{
this.jdesktop = jdesktop;
initClientSession(null);
}
/**
+ * init a connection to the session at the given url
+ * @param jdesktop
+ * @param sessionUrl
+ */
+ public VamsasApplication(Desktop jdesktop, String sessionUrl)
+ {
+ this.jdesktop = jdesktop;
+ initClientSession(sessionUrl);
+ }
+ /**
* @throws IOException or other if clientfactory instantiation failed.
* @return list of current sessions or null if no session exists.
*/
uk.ac.vamsas.client.IClientFactory clientfactory = getClientFactory();
if (sess==null)
{
- vclient = clientfactory.getIClient(app);
+ vclient = clientfactory.getNewSessionIClient(app);
}
else
{
user = vclient.getUserHandle();
- } catch (NoDefaultSessionException e)
- {
- return false;
- }
+ }
catch (Exception e)
{
jalview.bin.Cache.log.error("Couldn't instantiate vamsas client !",e);