Class ProxyMappings
- java.lang.Object
- 
- org.keycloak.connections.httpclient.ProxyMappings
 
- 
 public class ProxyMappings extends Object ProxyMappingsdescribes an ordered mapping for hostname regex patterns to aHttpHostproxy.Mappings can be created via valueOf(String...)orvalueOf(List). For a description of the mapping format seeProxyMappings.ProxyMapping.valueOf(String)- Author:
- Thomas Darimont
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classProxyMappings.ProxyMappingProxyMappings.ProxyMappingdescribes a Proxy Mapping with a HostnamePatternthat is mapped to a proxyHttpHost.
 - 
Constructor SummaryConstructors Constructor Description ProxyMappings(List<ProxyMappings.ProxyMapping> entries)Creates aProxyMappingsfrom the providedEntries.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearCache()ProxyMappings.ProxyMappinggetProxyFor(String hostname)booleanisEmpty()static ProxyMappingsvalueOf(String... proxyMappings)Creates a newProxyMappingsfrom the providedString[]of proxy mapping strings.static ProxyMappingsvalueOf(List<String> proxyMappings)Creates a newProxyMappingsfrom the providedListof proxy mapping strings.static ProxyMappingswithFixedProxyMapping(String httpProxy, String noProxy)Creates a newProxyMappingsfrom provided parameters representing the establishedHTTP(S)_PROXYandNO_PROXYenvironment variables.
 
- 
- 
- 
Constructor Detail- 
ProxyMappingspublic ProxyMappings(List<ProxyMappings.ProxyMapping> entries) Creates aProxyMappingsfrom the providedEntries.- Parameters:
- entries-
 
 
- 
 - 
Method Detail- 
valueOfpublic static ProxyMappings valueOf(List<String> proxyMappings) Creates a newProxyMappingsfrom the providedListof proxy mapping strings.- Parameters:
- proxyMappings-
 
 - 
valueOfpublic static ProxyMappings valueOf(String... proxyMappings) Creates a newProxyMappingsfrom the providedString[]of proxy mapping strings.- Parameters:
- proxyMappings-
- Returns:
- See Also:
- valueOf(List),- valueOf(String...)
 
 - 
withFixedProxyMappingpublic static ProxyMappings withFixedProxyMapping(String httpProxy, String noProxy) Creates a newProxyMappingsfrom provided parameters representing the establishedHTTP(S)_PROXYandNO_PROXYenvironment variables.- Parameters:
- httpProxy- a proxy used for all hosts except the ones specified in- noProxy
- noProxy- a list of hosts (separated by comma) that should not use proxy; all suffixes are matched too (e.g. redhat.com will also match access.redhat.com)
- Returns:
- See Also:
- https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/
 
 - 
isEmptypublic boolean isEmpty() 
 - 
getProxyForpublic ProxyMappings.ProxyMapping getProxyFor(String hostname) - Parameters:
- hostname-
- Returns:
- the ProxyMappings.ProxyMappingassociated with the first matching hostnamePatternor theProxyMappings.ProxyMappingincluding null asHttpHostif none matches.
 
 - 
clearCachepublic static void clearCache() 
 
- 
 
-