RTC java client Login to Server
RTC java client Login to Server
List of import for Client dev
The First step is login into RTC server using client api
IProgressMonitor monitor = new NullProgressMonitor();
String repositoryURI = args[0];
final String userId = args[1];
final String password = args[2];
TeamPlatform.startup();
try {
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
repo.registerLoginHandler(new ILoginHandler2() {
@Override
public ILoginInfo2 challenge(final ITeamRepository repo) {
return new UsernameAndPasswordLoginInfo(userId, password);
}
});
repo.login(monitor);
//Login success
// Write here
repo.logout();
}
catch (TeamRepositoryException e) {
e.printStackTrace();
}
finally {
TeamPlatform.shutdown();
}
List of import for Client dev
The First step is login into RTC server using client api
IProgressMonitor monitor = new NullProgressMonitor();
String repositoryURI = args[0];
final String userId = args[1];
final String password = args[2];
TeamPlatform.startup();
try {
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
repo.registerLoginHandler(new ILoginHandler2() {
@Override
public ILoginInfo2 challenge(final ITeamRepository repo) {
return new UsernameAndPasswordLoginInfo(userId, password);
}
});
repo.login(monitor);
//Login success
// Write here
repo.logout();
}
catch (TeamRepositoryException e) {
e.printStackTrace();
}
finally {
TeamPlatform.shutdown();
}
Comments
Post a Comment