Class DomainName

java.lang.Object
com.aoapps.net.DomainName
All Implemented Interfaces:
DtoFactory<DomainName>, FastExternalizable, Internable<DomainName>, Externalizable, Serializable, Comparable<DomainName>

public final class DomainName extends Object implements Comparable<DomainName>, FastExternalizable, DtoFactory<DomainName>, Internable<DomainName>
Represents a DNS domain name. Domain names must:
  • Be non-null
  • Be non-empty
  • May not be "default" (case-insensitive) - to avoid conflicts with Cyrus no-domain configurations.
  • Conform to definition in https://wikipedia.org/wiki/Hostname#Internet_hostnames and https://wikipedia.org/wiki/DNS_label#Parts_of_a_domain_name
  • May be "localhost" or "localhost.localdomain" - other checks that conflict with this are skipped.
  • Last domain label must be alphabetic (not be all numeric)
  • Last label must be a valid top level domain.
  • For reverse IP address delegation, if the domain ends with ".in-addr.arpa", the first label may also be in the format "##/##".
  • Not end with a period (.)
Author:
AO Industries, Inc.
See Also: