Class SNIServerName
- Direct Known Subclasses:
SNIHostName
The SNI extension is a feature that extends the SSL/TLS/DTLS protocols to indicate what server name the client is attempting to connect to during handshaking. See section 3, "Server Name Indication", of TLS Extensions (RFC 6066).
SNIServerName objects are immutable. Subclasses should not provide
methods that can change the state of an instance once it has been created.
- Since:
- 1.8
- External Specifications
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSNIServerName(int type, byte[] encoded) Creates anSNIServerNameusing the specified name type and encoded value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this server name.final byte[]Returns a copy of the encoded server name value of this server name.final intgetType()Returns the name type of this server name.inthashCode()Returns a hash code value for this server name.toString()Returns a string representation of this server name, including the server name type and the encoded server name value in thisSNIServerNameobject.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
SNIServerName
protected SNIServerName(int type, byte[] encoded) Creates anSNIServerNameusing the specified name type and encoded value.Note that the
encodedbyte array is cloned to protect against subsequent modification.- Parameters:
type- the type of the server nameencoded- the encoded value of the server name- Throws:
IllegalArgumentException- iftypeis not in the range of 0 to 255, inclusive.NullPointerException- ifencodedis null
-
-
Method Details
-
getType
public final int getType()Returns the name type of this server name.- Returns:
- the name type of this server name
-
getEncoded
public final byte[] getEncoded()Returns a copy of the encoded server name value of this server name.- Returns:
- a copy of the encoded server name value of this server name
-
equals
Indicates whether some other object is "equal to" this server name. -
hashCode
-
toString
Returns a string representation of this server name, including the server name type and the encoded server name value in thisSNIServerNameobject.The exact details of the representation are unspecified and subject to change, but the following may be regarded as typical:
"type=<name type>, value=<name value>"In this class, the format of "<name type>" is "[LITERAL] (INTEGER)", where the optional "LITERAL" is the literal name, and INTEGER is the integer value of the name type. The format of "<name value>" is "XX:...:XX", where "XX" is the hexadecimal digit representation of a byte value. For example, a returned value of a pseudo server name may look like:
"type=(31), value=77:77:77:2E:65:78:61:6D:70:6C:65:2E:63:6E"or"type=host_name (0), value=77:77:77:2E:65:78:61:6D:70:6C:65:2E:63:6E"Please NOTE that the exact details of the representation are unspecified and subject to change, and subclasses may override the method with their own formats.
-