Specifies the URL to be used for proxy auto-configuration. Expected format is http://hostname.com:1234/pacfile . This is required if #getProxyType() is set to ProxyType#PAC, ignored otherwise. @param proxyAutoconfigUrl the URL for proxy auto-configuration @return refere
(String proxyAutoconfigUrl)
| 416 | * @return reference to self |
| 417 | */ |
| 418 | public Proxy setProxyAutoconfigUrl(String proxyAutoconfigUrl) { |
| 419 | verifyProxyTypeCompatibility(ProxyType.PAC); |
| 420 | this.proxyType = ProxyType.PAC; |
| 421 | this.proxyAutoconfigUrl = proxyAutoconfigUrl; |
| 422 | return this; |
| 423 | } |
| 424 | |
| 425 | private void verifyProxyTypeCompatibility(ProxyType compatibleProxy) { |
| 426 | if (proxyType != ProxyType.UNSPECIFIED && proxyType != compatibleProxy) { |