Class ProxyMappings
java.lang.Object
org.keycloak.connections.httpclient.ProxyMappings
ProxyMappings describes an ordered mapping for hostname regex patterns to a HttpHost proxy.
 
 Mappings can be created via valueOf(String...) or valueOf(List).
 For a description of the mapping format see ProxyMappings.ProxyMapping.valueOf(String)
- Author:
 - Thomas Darimont
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classProxyMappings.ProxyMappingdescribes a Proxy Mapping with a HostnamePatternthat is mapped to a proxyHttpHost. - 
Constructor Summary
ConstructorsConstructorDescriptionProxyMappings(List<ProxyMappings.ProxyMapping> entries) Creates aProxyMappingsfrom the providedEntries. - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidgetProxyFor(String hostname) booleanisEmpty()static ProxyMappingsCreates a newProxyMappingsfrom the providedString[]of proxy mapping strings.static ProxyMappingsCreates 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 Details
- 
ProxyMappings
Creates aProxyMappingsfrom the providedEntries.- Parameters:
 entries-
 
 - 
 - 
Method Details
- 
valueOf
Creates a newProxyMappingsfrom the providedListof proxy mapping strings.- Parameters:
 proxyMappings-
 - 
valueOf
Creates a newProxyMappingsfrom the providedString[]of proxy mapping strings.- Parameters:
 proxyMappings-- Returns:
 - See Also:
 
 - 
withFixedProxyMapping
Creates a newProxyMappingsfrom provided parameters representing the establishedHTTP(S)_PROXYandNO_PROXYenvironment variables.- Parameters:
 httpProxy- a proxy used for all hosts except the ones specified innoProxynoProxy- 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:
 
 - 
isEmpty
public boolean isEmpty() - 
getProxyFor
- Parameters:
 hostname-- Returns:
 - the 
ProxyMappings.ProxyMappingassociated with the first matching hostnamePatternor theProxyMappings.ProxyMappingincluding null asHttpHostif none matches. 
 - 
clearCache
public static void clearCache() 
 -