public class ProxyMappings extends Object
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)
Modifier and Type | Class and Description |
---|---|
static class |
ProxyMappings.ProxyMapping
ProxyMappings.ProxyMapping describes a Proxy Mapping with a Hostname Pattern
that is mapped to a proxy HttpHost . |
Constructor and Description |
---|
ProxyMappings(List<ProxyMappings.ProxyMapping> entries)
Creates a
ProxyMappings from the provided Entries . |
Modifier and Type | Method and Description |
---|---|
static void |
clearCache() |
ProxyMappings.ProxyMapping |
getProxyFor(String hostname) |
boolean |
isEmpty() |
static ProxyMappings |
valueOf(List<String> proxyMappings)
Creates a new
ProxyMappings from the provided List of proxy mapping strings. |
static ProxyMappings |
valueOf(String... proxyMappings)
Creates a new
ProxyMappings from the provided String[] of proxy mapping strings. |
public ProxyMappings(List<ProxyMappings.ProxyMapping> entries)
ProxyMappings
from the provided Entries
.entries
- public static ProxyMappings valueOf(List<String> proxyMappings)
ProxyMappings
from the provided List
of proxy mapping strings.
proxyMappings
- public static ProxyMappings valueOf(String... proxyMappings)
ProxyMappings
from the provided String[]
of proxy mapping strings.proxyMappings
- valueOf(List)
,
valueOf(String...)
public boolean isEmpty()
public ProxyMappings.ProxyMapping getProxyFor(String hostname)
hostname
- ProxyMappings.ProxyMapping
associated with the first matching hostname Pattern
or the ProxyMappings.ProxyMapping
including null as HttpHost
if none matches.public static void clearCache()
Copyright © 2021 JBoss by Red Hat. All rights reserved.