/** * Get the system proxy (if any) for the given URL's host. */ private Proxy getSystemProxy(String hostname) { if (systemProxyConfiguration != null) { return getProxy(systemProxyConfiguration, hostname); } // No proxy configured return null; }
/** * This method returns the Proxy server should it be set on the * Client Side Policy. * * @return The proxy server or null, if not set. */ public Proxy createProxy(HTTPClientPolicy policy, URI currentUrl) { if (policy != null) { // Maybe the user has provided some proxy information if (policy.isSetProxyServer() && !StringUtils.isEmpty(policy.getProxyServer())) { return getProxy(policy, currentUrl.getHost()); } // There is a policy but no Proxy configuration, // fallback on the system proxy configuration return getSystemProxy(currentUrl.getHost()); } // Use system proxy configuration return getSystemProxy(currentUrl.getHost()); }
/** * Get the system proxy (if any) for the given URL's host. */ private Proxy getSystemProxy(String hostname) { if (systemProxyConfiguration != null) { return getProxy(systemProxyConfiguration, hostname); } // No proxy configured return null; }
/** * Get the system proxy (if any) for the given URL's host. */ private Proxy getSystemProxy(String hostname) { if (systemProxyConfiguration != null) { return getProxy(systemProxyConfiguration, hostname); } // No proxy configured return null; }
/** * This method returns the Proxy server should it be set on the * Client Side Policy. * * @return The proxy server or null, if not set. */ public Proxy createProxy(HTTPClientPolicy policy, URI currentUrl) { if (policy != null) { // Maybe the user has provided some proxy information if (policy.isSetProxyServer() && !StringUtils.isEmpty(policy.getProxyServer())) { return getProxy(policy, currentUrl.getHost()); } // There is a policy but no Proxy configuration, // fallback on the system proxy configuration return getSystemProxy(currentUrl.getHost()); } // Use system proxy configuration return getSystemProxy(currentUrl.getHost()); }
/** * This method returns the Proxy server should it be set on the * Client Side Policy. * * @return The proxy server or null, if not set. */ public Proxy createProxy(HTTPClientPolicy policy, URI currentUrl) { if (policy != null) { // Maybe the user has provided some proxy information if (policy.isSetProxyServer() && !StringUtils.isEmpty(policy.getProxyServer())) { return getProxy(policy, currentUrl.getHost()); } else { // There is a policy but no Proxy configuration, // fallback on the system proxy configuration return getSystemProxy(currentUrl.getHost()); } } else { // Use system proxy configuration return getSystemProxy(currentUrl.getHost()); } }