Package com.neovisionaries.ws.client
Class HostnameUnverifiedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.neovisionaries.ws.client.WebSocketException
com.neovisionaries.ws.client.HostnameUnverifiedException
- All Implemented Interfaces:
Serializable
The certificate of the peer does not match the expected hostname.
WebSocketException.getError() of this class returns HOSTNAME_UNVERIFIED.
See Verify that certificate is valid for server hostname (#107).
- Since:
- 2.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHostnameUnverifiedException(SSLSocket socket, String hostname) Constructor with the SSL socket and the expected hostname. -
Method Summary
Modifier and TypeMethodDescriptionGet the expected hostname.Get the SSL socket against which the hostname verification failed.Methods inherited from class com.neovisionaries.ws.client.WebSocketException
getErrorMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HostnameUnverifiedException
Constructor with the SSL socket and the expected hostname.- Parameters:
socket- The SSL socket against which the hostname verification failed.hostname- The expected hostname.
-
-
Method Details
-
getSSLSocket
Get the SSL socket against which the hostname verification failed.- Returns:
- The SSL socket.
-
getHostname
Get the expected hostname.- Returns:
- The expected hostname.
-