public static class ProxyMappings.ProxyMapping extends Object
ProxyMappings.ProxyMapping
describes a Proxy Mapping with a Hostname Pattern
that is mapped to a proxy HttpHost
.Constructor and Description |
---|
ProxyMapping(Pattern hostnamePattern,
org.apache.http.HttpHost proxy) |
Modifier and Type | Method and Description |
---|---|
Pattern |
getHostnamePattern() |
org.apache.http.HttpHost |
getProxy() |
boolean |
matches(String hostname) |
String |
toString() |
static ProxyMappings.ProxyMapping |
valueOf(String mapping)
Parses a mapping string into an
ProxyMappings.ProxyMapping . |
public static final String NO_PROXY
public ProxyMapping(Pattern hostnamePattern, org.apache.http.HttpHost proxy)
public Pattern getHostnamePattern()
public org.apache.http.HttpHost getProxy()
public boolean matches(String hostname)
public static ProxyMappings.ProxyMapping valueOf(String mapping)
ProxyMappings.ProxyMapping
.
A proxy mapping string must have the following format: hostnameRegex;www-proxy-uri
with semicolon as a delimiter.
If no proxy should be used for a host pattern then use NO_PROXY
as www-proxy-uri.
Examples:
.*\.(google\.com|googleapis\.com);http://www-proxy.acme.corp.com:8080
.*\.acme\.corp\.com;NO_PROXY
.*;http://fallback:8080
mapping
- Copyright © 2019 JBoss by Red Hat. All rights reserved.