类 PublicSuffixMatcher

java.lang.Object
org.apache.pulsar.common.tls.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

从以下版本开始:
4.4
另请参阅:
  • 构造器详细资料

  • 方法详细资料

    • getDomainRoot

      public String getDomainRoot(String domain)
      Returns registrable part of the domain for the given domain name or null if given domain represents a public suffix.
      参数:
      domain -
      返回:
      domain root
    • getDomainRoot

      public String getDomainRoot(String domain, DomainType expectedType)
      Returns registrable part of the domain for the given domain name or null if given domain represents a public suffix.
      参数:
      domain -
      expectedType - expected domain type or null if any.
      返回:
      domain root
      从以下版本开始:
      4.5
    • matches

      public boolean matches(String domain)
      Tests whether the given domain matches any of entry from the public suffix list.
    • matches

      public boolean matches(String domain, DomainType expectedType)
      Tests whether the given domain matches any of entry from the public suffix list.
      参数:
      domain -
      expectedType - expected domain type or null if any.
      返回:
      true if the given domain matches any of the public suffixes.
      从以下版本开始:
      4.5