RTC 6.0: How to get Proxyhost and ProxyPort from RTC Eclipse Client.
Hi All,
I am able to get the Username,Password and URL from RTC Eclipse client : https://jazz.net/forum/questions/214936/rtc-60-how-to-get-log-in-user-password-in-rtc-eclipse-client
But i also need to get the proxy setting being used on the network . can anybody give some hint on this ?. Thanks in advance. :)
I am able to get the Username,Password and URL from RTC Eclipse client : https://jazz.net/forum/questions/214936/rtc-60-how-to-get-log-in-user-password-in-rtc-eclipse-client
But i also need to get the proxy setting being used on the network . can anybody give some hint on this ?. Thanks in advance. :)
Accepted answer
This is a question related to Eclipse, not specific to RTC.
When you mention ProxyHost and ProxyPort, I assume that you are talking about the Java properties http.proxyHost and http.proxyPort. In this case, you can just use the System.getProperty() method to retrieve the values.
If you are referring to the Eclipse network connection configuration, that's another story. In this case, you can use the Platform.getPreferencesService() method to get the preference service and then access the preference tree.
https://wiki.eclipse.org/FAQ_How_do_I_use_the_preference_service%3F
http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/preferences/IPreferencesService.html
Note that if the proxy requires authentication, the username and password are stored in the Equinox Secure Storage, and you need to appropriate API to access such information.
When you mention ProxyHost and ProxyPort, I assume that you are talking about the Java properties http.proxyHost and http.proxyPort. In this case, you can just use the System.getProperty() method to retrieve the values.
If you are referring to the Eclipse network connection configuration, that's another story. In this case, you can use the Platform.getPreferencesService() method to get the preference service and then access the preference tree.
https://wiki.eclipse.org/FAQ_How_do_I_use_the_preference_service%3F
http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/preferences/IPreferencesService.html
Note that if the proxy requires authentication, the username and password are stored in the Equinox Secure Storage, and you need to appropriate API to access such information.