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 WebSocketException
getErrorMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HostnameUnverifiedException
-
-
Method Details
-
getSSLSocket
Get the SSL socket against which the hostname verification failed.- Returns:
- The SSL socket.
-
getHostname
-