public class ProxyConfig extends Object
Constructor and Description |
---|
ProxyConfig(org.apache.http.HttpHost proxy,
org.apache.http.auth.UsernamePasswordCredentials creds,
String[] proxyBypass,
Map<String,ProxyProfileConfig> proxyProfileMap) |
Modifier and Type | Method and Description |
---|---|
ProxyAuthenticator |
createProxyAuthenticator()
returns DefaultProxyAuthenticator if single proxy server is configured
ProfileProxyAuthenticator if proxy profile is configured
|
org.apache.http.auth.UsernamePasswordCredentials |
getCredentialsForTargetHost(String targetHost)
select the proxy credential for the targetHost
|
org.apache.http.auth.UsernamePasswordCredentials |
getCreds() |
org.apache.http.HttpHost |
getProxy() |
Set<String> |
getProxyBypass() |
boolean |
isProxyProfileConfigured()
checks weather the proxy profile map is empty
|
String |
logProxyConfig()
returns appropriate log message based on the proxy configuration
whether loading proxy profile or single proxy server or no proxy configured
|
org.apache.http.HttpHost |
selectProxy(org.apache.http.HttpHost target)
Selects the configured proxy server
|
String |
toString() |
public ProxyConfig(org.apache.http.HttpHost proxy, org.apache.http.auth.UsernamePasswordCredentials creds, String[] proxyBypass, Map<String,ProxyProfileConfig> proxyProfileMap)
public org.apache.http.HttpHost getProxy()
public org.apache.http.auth.UsernamePasswordCredentials getCreds()
public org.apache.http.HttpHost selectProxy(org.apache.http.HttpHost target)
target
- request endpointpublic boolean isProxyProfileConfigured()
public org.apache.http.auth.UsernamePasswordCredentials getCredentialsForTargetHost(String targetHost)
targetHost
- targeted hostpublic String logProxyConfig()
public ProxyAuthenticator createProxyAuthenticator() throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.