APIdia Launch Partner
Top Description Inners Methods
sun.security.util

public Interface RegisteredDomain

Known Direct Implementers
sun.security.util.DomainName.RegisteredDomainImpl
Imports
java.util.Optional

A domain that is registered under a "public suffix". The public suffix is a top-level domain under which names can be registered. For example, "com" and "co.uk" are public suffixes, and "example.com" and "example.co.uk" are registered domains.

The primary purpose of this class is to determine if domains are safe to use in various use-cases.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public static Optional<RegisteredDomain>

Returns:

an Optional<RegisteredDomain>; the Optional is empty if the domain is unknown or not registerable
from
(String
the domain name
domain
)

Returns an Optional<RegisteredDomain> representing the registered part of the specified domain.

public String

Returns:

the name of the registered domain
name
()

Returns the name of the registered domain.

public String

Returns:

the public suffix of the registered domain
publicSuffix
()

Returns the public suffix of the registered domain.

public RegisteredDomain.Type

Returns:

the type of the registered domain
type
()

Returns the type of the registered domain.

Method Detail

fromback to summary
public static Optional<RegisteredDomain> from(String domain)

Returns an Optional<RegisteredDomain> representing the registered part of the specified domain.

Parameters
domain:String

the domain name

Returns:Optional<RegisteredDomain>

an Optional<RegisteredDomain>; the Optional is empty if the domain is unknown or not registerable

Exceptions
NullPointerException:
if domain is null
nameback to summary
public String name()

Returns the name of the registered domain.

Returns:String

the name of the registered domain

publicSuffixback to summary
public String publicSuffix()

Returns the public suffix of the registered domain.

Returns:String

the public suffix of the registered domain

typeback to summary
public RegisteredDomain.Type type()

Returns the type of the registered domain.

Returns:RegisteredDomain.Type

the type of the registered domain

sun.security.util back to summary

public final Enum RegisteredDomain.Type

extends Enum<RegisteredDomain.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final RegisteredDomain.Type
ICANN

An ICANN registered domain.

public static final RegisteredDomain.Type
PRIVATE

A private registered domain.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static RegisteredDomain.Type
public static RegisteredDomain.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ICANNback to summary
public static final RegisteredDomain.Type ICANN

An ICANN registered domain.

PRIVATEback to summary
public static final RegisteredDomain.Type PRIVATE

A private registered domain.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static RegisteredDomain.Type valueOf(String name)
valuesback to summary
public static RegisteredDomain.Type[] values()