Specifies whether to autodetect proxy settings. @param autodetect set to true to use proxy auto detection, false to leave proxy settings unspecified @return reference to self
(boolean autodetect)
| 205 | * @return reference to self |
| 206 | */ |
| 207 | public Proxy setAutodetect(boolean autodetect) { |
| 208 | if (this.autodetect == autodetect) { |
| 209 | return this; |
| 210 | } |
| 211 | if (autodetect) { |
| 212 | verifyProxyTypeCompatibility(ProxyType.AUTODETECT); |
| 213 | this.proxyType = ProxyType.AUTODETECT; |
| 214 | } else { |
| 215 | this.proxyType = ProxyType.UNSPECIFIED; |
| 216 | } |
| 217 | this.autodetect = autodetect; |
| 218 | return this; |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Gets the FTP proxy. |