public class OpeningHandshakeException extends WebSocketException
An exception raised due to a violation against the WebSocket protocol.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBody()
Get the response body contained in the WebSocket opening handshake
response from the server.
|
Map<String,List<String>> |
getHeaders()
Get the HTTP headers contained in the WebSocket opening handshake
response from the server.
|
StatusLine |
getStatusLine()
Get the status line contained in the WebSocket opening handshake
response from the server.
|
getErroraddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic StatusLine getStatusLine()
Get the status line contained in the WebSocket opening handshake response from the server.
public Map<String,List<String>> getHeaders()
Get the HTTP headers contained in the WebSocket opening handshake response from the server.
TreeMap with String.CASE_INSENSITIVE_ORDER comparator.public byte[] getBody()
Get the response body contained in the WebSocket opening handshake response from the server.
<p>
This method returns a non-null value only when (1) the status code
is not 101 (Switching Protocols), (2) the response from the server
has a response body, (3) the response has "Content-Length" header,
and (4) no error occurred during reading the response body. In other
cases, this method returns null.
</p>
Copyright © 2021. All Rights Reserved.