/** * @return The proxy options from the builder settings */ public ProxyOptions build() { return new ProxyOptions(proxyMode, proxyHostMap, nonProxyHosts); }
public static Option<ProxyConfig> getProxyConfig(final HttpClientOptions options) { final Option<ProxyConfig> config; switch (options.getProxyOptions().getProxyMode()) { case SYSTEM_PROPERTIES: config = Option.some(new SystemPropertiesProxyConfig()); break; case CONFIGURED: config = Option.some(new ProvidedProxyConfig( options.getProxyOptions().getProxyHosts(), options.getProxyOptions().getNonProxyHosts())); break; default: config = Option.none(); } return config; } }