Class SNIHostName


public final class SNIHostName extends SNIServerName
Instances of this class represent a server name of type host_name in a Server Name Indication (SNI) extension.

As described in section 3, "Server Name Indication", of TLS Extensions (RFC 6066), "HostName" contains the fully qualified DNS hostname of the server, as understood by the client. The encoded server name value of a hostname is represented as a byte string using ASCII encoding without a trailing dot. This allows the support of Internationalized Domain Names (IDN) through the use of A-labels (the ASCII-Compatible Encoding (ACE) form of a valid string of Internationalized Domain Names for Applications (IDNA)) defined in RFC 5890.

Note that SNIHostName objects are immutable.

Since:
1.8
External Specifications
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    SNIHostName(byte[] encoded)
    Creates an SNIHostName using the specified encoded value.
    SNIHostName(String hostname)
    Creates an SNIHostName using the specified hostname.
  • Method Summary

    Modifier and Type
    Method
    Description
    static SNIMatcher
    Creates an SNIMatcher object for SNIHostNames.
    boolean
    equals(Object other)
    Compares this server name to the specified object.
    Returns the StandardCharsets.US_ASCII-compliant hostname of this SNIHostName object.
    int
    Returns a hash code value for this SNIHostName.
    Returns a string representation of the object, including the DNS hostname in this SNIHostName object.

    Methods declared in class SNIServerName

    getEncoded, getType
    Modifier and Type
    Method
    Description
    final byte[]
    Returns a copy of the encoded server name value of this server name.
    final int
    Returns the name type of this server name.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Creates and returns a copy of this object.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Finalization is deprecated and subject to removal in a future release.
    final Class<?>
    Returns the runtime class of this Object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    final void
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
    final void
    wait(long timeoutMillis)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
    final void
    wait(long timeoutMillis, int nanos)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.