Class PublicSuffixMatcher
java.lang.Object
org.apache.cxf.transport.https.httpclient.PublicSuffixMatcher
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.
-
Constructor Summary
ConstructorsConstructorDescriptionPublicSuffixMatcher(Collection<String> rules, Collection<String> exceptions) PublicSuffixMatcher(DomainType domainType, Collection<String> rules, Collection<String> exceptions) -
Method Summary
Modifier and TypeMethodDescriptiongetDomainRoot(String domain) Returns registrable part of the domain for the given domain name ornullif given domain represents a public suffix.getDomainRoot(String domain, DomainType expectedType) Returns registrable part of the domain for the given domain name ornullif given domain represents a public suffix.booleanTests whether the given domain matches any of entry from the public suffix list.booleanmatches(String domain, DomainType expectedType) Tests whether the given domain matches any of entry from the public suffix list.
-
Constructor Details
-
PublicSuffixMatcher
-
PublicSuffixMatcher
public PublicSuffixMatcher(DomainType domainType, Collection<String> rules, Collection<String> exceptions) -
PublicSuffixMatcher
-
-
Method Details
-
getDomainRoot
Returns registrable part of the domain for the given domain name ornullif given domain represents a public suffix.- Parameters:
domain-- Returns:
- domain root
-
getDomainRoot
Returns registrable part of the domain for the given domain name ornullif given domain represents a public suffix.- Parameters:
domain-expectedType- expected domain type ornullif any.- Returns:
- domain root
-
matches
Tests whether the given domain matches any of entry from the public suffix list. -
matches
Tests whether the given domain matches any of entry from the public suffix list.- Parameters:
domain-expectedType- expected domain type ornullif any.- Returns:
trueif the given domain matches any of the public suffixes.
-