org.apache.cxf.transport.https.httpclient
Class PublicSuffixMatcher
java.lang.Object
org.apache.cxf.transport.https.httpclient.PublicSuffixMatcher
public final class PublicSuffixMatcher
- extends Object
Utility class that can test if DNS names match the content of the Public Suffix List.
An up-to-date list of suffixes can be obtained from
publicsuffix.org
Copied from httpclient.
|
Method Summary |
String |
getDomainRoot(String domain)
Returns registrable part of the domain for the given domain name of null
if given domain represents a public suffix. |
boolean |
matches(String domain)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PublicSuffixMatcher
public PublicSuffixMatcher(Collection<String> rules,
Collection<String> exceptions)
getDomainRoot
public String getDomainRoot(String domain)
- Returns registrable part of the domain for the given domain name of
null
if given domain represents a public suffix.
- Parameters:
domain -
- Returns:
- domain root
matches
public boolean matches(String domain)
Apache CXF