This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Introduce API for network proxy settings | ||
---|---|---|---|
Product: | platform | Reporter: | Jiri Rechtacek <jrechtacek> |
Component: | -- Other -- | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anebuzelsky, jglick, mmirilovic, pjiricka, tstupka |
Priority: | P2 | Keywords: | API, API_REVIEW_FAST |
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | proposal API for proxy settings |
Description
Jiri Rechtacek
2011-01-20 15:32:13 UTC
Based on discussion with Tomas S. I'm going to propose a simple API for getting active proxy settings. A typical use-case for this API is a module which reads proxy setting and does setup external tools for network access. This API will not help to build own UI for proxy settings other than Tools|Options. I propose to deploy API into Utilities API (i.e. org.openide.util) The signature could be look like: ======================== public final class NetworkSettings { static public String ProxySetting.getHost(URI u) static public String ProxySetting.getPort(URI u) static public PasswordAuthentication ProxySetting.getPasswordAuthentication(URI u)} ======================== It's just idea, the proposal as diff will be attached before API review. Now, I will make a prototype using this API as a proof of concept. Created attachment 105414 [details]
proposal API for proxy settings
Added NetworkSetting class into Utilities API, this API allows get hostname a port of active network proxy for URI given as parameter, also if a proxy requires authentication the API can return username and key for reading password from Keyring.
The implementation and prototype of API usage found on branch proxy-api-194530 over core-main repository.
Thanks for review.
FYI, I'm going to integrate it tomorrow. core-main/rev/677ecc06bfd6 Shouldn't we be using java.net.useSystemProxies for those systems (Win32, Gnome) where it is available? If I understand correctly, this standard proxy selector would be superior for some purposes to anything we have in the IDE now, since it would handle proxy config changes made while the IDE is running. |