类 PublicSuffixMatcher
java.lang.Object
org.apache.pulsar.common.tls.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
- 从以下版本开始:
- 4.4
- 另请参阅:
-
构造器概要
构造器构造器说明PublicSuffixMatcher
(Collection<String> rules, Collection<String> exceptions) PublicSuffixMatcher
(DomainType domainType, Collection<String> rules, Collection<String> exceptions) -
方法概要
修饰符和类型方法说明getDomainRoot
(String domain) Returns registrable part of the domain for the given domain name ornull
if given domain represents a public suffix.getDomainRoot
(String domain, DomainType expectedType) Returns registrable part of the domain for the given domain name ornull
if given domain represents a public suffix.boolean
Tests whether the given domain matches any of entry from the public suffix list.boolean
matches
(String domain, DomainType expectedType) Tests whether the given domain matches any of entry from the public suffix list.
-
构造器详细资料
-
PublicSuffixMatcher
-
PublicSuffixMatcher
public PublicSuffixMatcher(DomainType domainType, Collection<String> rules, Collection<String> exceptions) - 从以下版本开始:
- 4.5
-
PublicSuffixMatcher
- 从以下版本开始:
- 4.5
-
-
方法详细资料
-
getDomainRoot
Returns registrable part of the domain for the given domain name ornull
if given domain represents a public suffix.- 参数:
domain
-- 返回:
- domain root
-
getDomainRoot
Returns registrable part of the domain for the given domain name ornull
if given domain represents a public suffix.- 参数:
domain
-expectedType
- expected domain type ornull
if any.- 返回:
- domain root
- 从以下版本开始:
- 4.5
-
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.- 参数:
domain
-expectedType
- expected domain type ornull
if any.- 返回:
true
if the given domain matches any of the public suffixes.- 从以下版本开始:
- 4.5
-