use of cbit.vcell.message.server.console.LoginChecker.SiteInfo in project vcell by virtualcell.
the class SBMLExportTest method getConnection.
static VCellConnection getConnection(String siteName, String user, String password) {
Collection<SiteInfo> sites = LoginChecker.getSiteInfos(siteName);
for (SiteInfo si : sites) {
try {
String url = si.bootStrapUrl();
VCellBootstrap vcellBootstrap = (VCellBootstrap) java.rmi.Naming.lookup(url);
DigestedPassword dp = new UserLoginInfo.DigestedPassword(password);
UserLoginInfo uli = new UserLoginInfo(user, dp);
VCellConnection vcellConnection = vcellBootstrap.getVCellConnection(uli);
return vcellConnection;
} catch (Exception e) {
System.err.println(e.getMessage());
continue;
}
}
throw new RuntimeException("No connection for site " + siteName);
}
Aggregations