Uses of Class
com.neovisionaries.ws.client.WebSocketException
-
Uses of WebSocketException in com.neovisionaries.ws.client
Subclasses of WebSocketException in com.neovisionaries.ws.clientModifier and TypeClassDescriptionclass
The certificate of the peer does not match the expected hostname.(package private) class
(package private) class
class
An exception raised due to a violation against the WebSocket protocol.Methods in com.neovisionaries.ws.client with parameters of type WebSocketExceptionModifier and TypeMethodDescriptionvoid
ListenerManager.callOnConnectError
(WebSocketException cause) void
ListenerManager.callOnError
(WebSocketException cause) private void
ReadingThread.callOnError
(WebSocketException cause) CallonError
method of the listeners.void
ListenerManager.callOnFrameError
(WebSocketException cause, WebSocketFrame frame) private void
ReadingThread.callOnFrameError
(WebSocketException cause, WebSocketFrame frame) CallonFrameError
method of the listeners.void
ListenerManager.callOnMessageDecompressionError
(WebSocketException cause, byte[] compressed) private void
ReadingThread.callOnMessageDecompressionError
(WebSocketException cause, byte[] compressed) CallonMessageDecompressionError
method of the listeners.void
ListenerManager.callOnMessageError
(WebSocketException cause, List<WebSocketFrame> frames) private void
ReadingThread.callOnMessageError
(WebSocketException cause, List<WebSocketFrame> frames) CallonMessageError
method of the listeners.void
ListenerManager.callOnSendError
(WebSocketException cause, WebSocketFrame frame) void
ListenerManager.callOnTextMessageError
(WebSocketException cause, byte[] data) private void
ReadingThread.callOnTextMessageError
(WebSocketException cause, byte[] data) CallonTextMessageError
method of the listeners.void
ListenerManager.callOnUnexpectedError
(WebSocketException cause) private WebSocketFrame
ReadingThread.createCloseFrame
(WebSocketException wse) private void
ConnectThread.handleError
(WebSocketException cause) void
WebSocketAdapter.onConnectError
(WebSocket websocket, WebSocketException exception) void
WebSocketListener.onConnectError
(WebSocket websocket, WebSocketException cause) Called whenWebSocket.connectAsynchronously()
failed.void
WebSocketAdapter.onError
(WebSocket websocket, WebSocketException cause) void
WebSocketListener.onError
(WebSocket websocket, WebSocketException cause) Call when an error occurred.void
WebSocketAdapter.onFrameError
(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) void
WebSocketListener.onFrameError
(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) Called when a WebSocket frame failed to be read from the WebSocket.void
WebSocketAdapter.onMessageDecompressionError
(WebSocket websocket, WebSocketException cause, byte[] compressed) void
WebSocketListener.onMessageDecompressionError
(WebSocket websocket, WebSocketException cause, byte[] compressed) Called when a message failed to be decompressed.void
WebSocketAdapter.onMessageError
(WebSocket websocket, WebSocketException cause, List<WebSocketFrame> frames) void
WebSocketListener.onMessageError
(WebSocket websocket, WebSocketException cause, List<WebSocketFrame> frames) Called when it failed to concatenate payloads of multiple frames to construct a message.void
WebSocketAdapter.onSendError
(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) void
WebSocketListener.onSendError
(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) Called when an error occurred when a frame was tried to be sent to the server.void
WebSocketAdapter.onTextMessageError
(WebSocket websocket, WebSocketException cause, byte[] data) void
WebSocketListener.onTextMessageError
(WebSocket websocket, WebSocketException cause, byte[] data) Called when it failed to convert payload data into a string.void
WebSocketAdapter.onUnexpectedError
(WebSocket websocket, WebSocketException cause) void
WebSocketListener.onUnexpectedError
(WebSocket websocket, WebSocketException cause) Called when an uncaught throwable was detected in either the reading thread (which reads frames from the server) or the writing thread (which sends frames to the server).Methods in com.neovisionaries.ws.client that throw WebSocketExceptionModifier and TypeMethodDescriptionConnectable.call()
private void
WebSocket.changeStateOnConnect()
protected abstract byte[]
PerMessageCompressionExtension.compress
(byte[] plain) Compress the plain message.protected byte[]
PerMessageDeflateExtension.compress
(byte[] plain) private int
PerMessageDeflateExtension.computeWindowSize
(String key, String value) SocketConnector.connect()
WebSocket.connect()
Connect to the server, send an opening handshake to the server, receive the response and then start threads to communicate with the server.private void
SocketConnector.connectSocket()
protected abstract byte[]
PerMessageCompressionExtension.decompress
(byte[] compressed) Decompress the compressed message.protected byte[]
PerMessageDeflateExtension.decompress
(byte[] compressed) private void
SocketConnector.doConnect()
private void
WritingThread.doFlush()
private int
PerMessageDeflateExtension.extractMaxWindowBits
(String key, String value) private long
WritingThread.flushIfLongInterval
(long lastFlushAt) SocketConnector.getConnectedSocket()
WebSocket.getConnectedSocket()
Get the raw socket which this WebSocket uses internally.private void
SocketConnector.handshake()
Perform proxy handshake and optionally SSL handshake.private WebSocketInputStream
WebSocket.openInputStream
(Socket socket) Open the input stream of the WebSocket connection.private WebSocketOutputStream
WebSocket.openOutputStream
(Socket socket) Open the output stream of the WebSocket connection.(package private) void
WebSocketInputStream.readBytes
(byte[] buffer, int length) WebSocketInputStream.readFrame()
HandshakeReader.readHandshake
(WebSocketInputStream input, String key) WebSocket.readHandshake
(WebSocketInputStream input, String key) Receive an opening handshake response from the WebSocket server.HandshakeReader.readHttpHeaders
(WebSocketInputStream input) private byte[]
WebSocketInputStream.readPayload
(long payloadLength, boolean mask, byte[] maskingKey) private StatusLine
HandshakeReader.readStatusLine
(WebSocketInputStream input) Read a status line from an HTTP server.private InetAddress[]
SocketConnector.resolveHostname()
private void
WritingThread.sendFrame
(WebSocketFrame frame) private void
WritingThread.sendFrames
(boolean last) private void
SocketConnector.setSoTimeout
(int timeout) WebSocket.shakeHands
(Socket socket) Perform the opening handshake.(package private) void
PerMessageDeflateExtension.validate()
(package private) void
WebSocketExtension.validate()
Validate this instance.private void
HandshakeReader.validateAccept
(StatusLine statusLine, Map<String, List<String>> headers, String key) Validate the value ofSec-WebSocket-Accept
header.private void
HandshakeReader.validateConnection
(StatusLine statusLine, Map<String, List<String>> headers) Validate the value ofConnection
header.private void
HandshakeReader.validateExtensionCombination
(StatusLine statusLine, Map<String, List<String>> headers, List<WebSocketExtension> extensions) private void
HandshakeReader.validateExtensions
(StatusLine statusLine, Map<String, List<String>> headers) Validate the value ofSec-WebSocket-Extensions
header.private void
PerMessageDeflateExtension.validateParameter
(String key, String value) private void
HandshakeReader.validateProtocol
(StatusLine statusLine, Map<String, List<String>> headers) Validate the value ofSec-WebSocket-Protocol
header.private void
HandshakeReader.validateStatusLine
(StatusLine statusLine, Map<String, List<String>> headers, WebSocketInputStream input) Validate the status line.private void
HandshakeReader.validateUpgrade
(StatusLine statusLine, Map<String, List<String>> headers) Validate the value ofUpgrade
header.private void
ReadingThread.verifyFrame
(WebSocketFrame frame) private void
ReadingThread.verifyFrameFragmentation
(WebSocketFrame frame) private void
ReadingThread.verifyFrameMask
(WebSocketFrame frame) Ensure that the given frame is not masked.private void
ReadingThread.verifyFrameOpcode
(WebSocketFrame frame) Ensure that the opcode of the give frame is a known one.private void
ReadingThread.verifyFrameSize
(WebSocketFrame frame) private void
ReadingThread.verifyReservedBit1
(WebSocketFrame frame) Verify the RSV1 bit of a frame.private boolean
ReadingThread.verifyReservedBit1ForPMCE
(WebSocketFrame frame) Verify the RSV1 bit of a frame using the rule described in RFC 7692.private void
ReadingThread.verifyReservedBit2
(WebSocketFrame frame) Verify the RSV2 bit of a frame.private void
ReadingThread.verifyReservedBit3
(WebSocketFrame frame) Verify the RSV3 bit of a frame.private void
ReadingThread.verifyReservedBits
(WebSocketFrame frame) private void
WebSocket.writeHandshake
(WebSocketOutputStream output, String key) Send an opening handshake request to the WebSocket server.