Is there a way to check if EWM client user is loggedIn/connected to remmote repository.
![](http://jazz.net/_images/myphoto/d3049c27cfaa388851a141dfec238438.jpg)
Hi there,
-
To check the user is loggedIn or connected to the repository
-
get or set username to connect to repository
- Close ewm client gracefully without killing process
One answer
![](http://jazz.net/_images/myphoto/d3049c27cfaa388851a141dfec238438.jpg)
- See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ section Getting the API in an Eclipse Plugin how to get the API, the repositories and the user ID. It would be possible to have multiple connections to different repositories with different passwords. Access to the passwords is most likely not available.
2. How to login is explained as well, there might be other ways, the code for that would be searchable in the SDK (perform lab 1 of the Extensions Workshop to have a development environment with source code). You also use TeamPlatform.getTeamRepositoryService().addTeamRepository(repository); to add the team repository.
3. How to end the Eclipse client would be a question for the Eclipse forums.
You would have to implement this as an Eclipse plugin, otherwise this does not make any sense at all.
Comments
![](http://jazz.net/_images/myphoto/d3049c27cfaa388851a141dfec238438.jpg)
Thats right, I know the procedure with plain Java API for number (1) and (2) as you mentioned.
actually by running Rhapsody tests it must be connected to EWM client IDE, before starting tests. we need to be sure ewm is running and user is loggedIn, to go further with the tests, therefore we need to be sure that ewm client is up, running and logged in, before loading Rhapsody. hence I guess Java Plain API is not the case (not sure if Rhapsody model manager can connect/suport rhapsody or not!?have to test it).
For number (3) I have the same Idea even it can cover (1) (2) . by creating listener plugin which check if user is loggedIn etc and also close ewm client by recieving requests. but we thought there might be a simple way than developing eclipse and EWM client plugin itself.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
Note that the Java Code above is as much part of the EWM server and EWM client SDK as it is available in the plain Java Client Libraries, which is really just a different packaging of the SDK common and client APIs.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
With respect to Eclipse Plugin development, you would have to refer to the Eclipse community. The Eclipse plugins I do, if I do any are more concerned with the EWM APIs. Just an issue of focus.
![](http://jazz.net/_images/myphoto/d3049c27cfaa388851a141dfec238438.jpg)
Okay thank you for your remarks.