public enum WebSocketError extends Enum<WebSocketError>
WebSocketException.getError()| Enum Constant and Description |
|---|
CONTINUATION_NOT_CLOSED
A non-control frame was detected although the existing continuation had not been closed.
|
EXTENSION_PARSE_ERROR
The value in 'Sec-WebSocket-Extensions' failed to be parsed.
|
FLUSH_ERROR
Flushing frames to the server failed.
|
FRAGMENTED_CONTROL_FRAME
A control frame is fragmented.
|
FRAME_MASKED
A frame from the server is masked.
|
HTTP_HEADER_FAILURE
An error occurred while HTTP header section was being read.
|
INSUFFICENT_DATA
The end of the stream has been reached unexpectedly.
|
INSUFFICIENT_MEMORY_FOR_PAYLOAD
OutOfMemoryError occurred during a trial to allocate a memory area for a frame's payload.
|
INTERRUPTED_IN_READING
Interruption occurred while a frame was being read from the web socket.
|
INVALID_PAYLOAD_LENGTH
The payload length of a frame is invalid.
|
IO_ERROR_IN_READING
An I/O error occurred while a frame was being read from the web socket.
|
IO_ERROR_IN_WRITING
An I/O error occurred when a frame was tried to be sent.
|
MESSAGE_CONSTRUCTION_ERROR
Failed to concatenate payloads of multiple frames to construct a message.
|
NO_CONNECTION_HEADER
The opening handshake response does not contain 'Connection' header.
|
NO_SEC_WEBSOCKET_ACCEPT_HEADER
The opening handshake response does not contain 'Sec-WebSocket-Accept' header.
|
NO_UPGRADE_HEADER
The opening handshake response does not contain 'Upgrade' header.
|
NO_UPGRADE_IN_CONNECTION_HEADER
'Upgrade' was not found in 'Connection' header.
|
NO_WEBSOCKET_IN_UPGRADE_HEADER
'websocket' was not found in 'Upgrade' header.
|
NON_ZERO_RESERVED_BITS
At least one of the reserved bits of a frame is set.
|
NOT_IN_CREATED_STATE
The current state of the web socket is not CREATED.
|
NOT_SWITCHING_PROTOCOLS
The status code of the opening handshake response is not Switching Protocols.
|
OPENING_HAHDSHAKE_REQUEST_FAILURE
Failed to send an opening handshake request to the server.
|
OPENING_HANDSHAKE_RESPONSE_FAILURE
Failed to read an opening handshake response from the server.
|
SOCKET_INPUT_STREAM_FAILURE
Failed to get the input stream of the raw socket.
|
SOCKET_OUTPUT_STREAM_FAILURE
Failed to get the output stream of the raw socket.
|
STATUS_LINE_BAD_FORMAT
The status line of the opening handshake response is badly formatted.
|
STATUS_LINE_EMPTY
The status line of the opening handshake response is empty.
|
TEXT_MESSAGE_CONSTRUCTION_ERROR
Failed to convert payload data into a string.
|
TOO_LONG_CONTROL_FRAME_PAYLOAD
The payload size of a control frame exceeds the maximum size (125 bytes).
|
TOO_LONG_PAYLOAD
The payload length of a frame exceeds the maximum array size in Java.
|
UNEXPECTED_CONTINUATION_FRAME
A continuation frame was detected although a continuation had not started.
|
UNEXPECTED_ERROR_IN_READING_THREAD
An uncaught throwable was detected in the reading thread (which reads
frames from the server).
|
UNEXPECTED_ERROR_IN_WRITING_THREAD
An uncaught throwable was detected in the writing thread (which sends
frames to the server).
|
UNEXPECTED_SEC_WEBSOCKET_ACCEPT_HEADER
The value of 'Sec-WebSocket-Accept' header is different from the expected one.
|
UNKNOWN_OPCODE
A frame has an unknown opcode.
|
UNSUPPORTED_EXTENSION
The extension contained in the Sec-WebSocket-Extensions header is not supported.
|
UNSUPPORTED_PROTOCOL
The protocol contained in the Sec-WebSocket-Protocol header is not supported.
|
| Modifier and Type | Method and Description |
|---|---|
static WebSocketError |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WebSocketError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WebSocketError NOT_IN_CREATED_STATE
This error occurs if WebSocket.connect() is called
when the state of the web socket is not CREATED.
public static final WebSocketError SOCKET_INPUT_STREAM_FAILURE
public static final WebSocketError SOCKET_OUTPUT_STREAM_FAILURE
public static final WebSocketError OPENING_HAHDSHAKE_REQUEST_FAILURE
public static final WebSocketError OPENING_HANDSHAKE_RESPONSE_FAILURE
public static final WebSocketError STATUS_LINE_EMPTY
public static final WebSocketError STATUS_LINE_BAD_FORMAT
public static final WebSocketError NOT_SWITCHING_PROTOCOLS
public static final WebSocketError HTTP_HEADER_FAILURE
public static final WebSocketError NO_UPGRADE_HEADER
public static final WebSocketError NO_WEBSOCKET_IN_UPGRADE_HEADER
public static final WebSocketError NO_CONNECTION_HEADER
public static final WebSocketError NO_UPGRADE_IN_CONNECTION_HEADER
public static final WebSocketError NO_SEC_WEBSOCKET_ACCEPT_HEADER
public static final WebSocketError UNEXPECTED_SEC_WEBSOCKET_ACCEPT_HEADER
public static final WebSocketError EXTENSION_PARSE_ERROR
public static final WebSocketError UNSUPPORTED_EXTENSION
public static final WebSocketError UNSUPPORTED_PROTOCOL
public static final WebSocketError INSUFFICENT_DATA
public static final WebSocketError INVALID_PAYLOAD_LENGTH
public static final WebSocketError TOO_LONG_PAYLOAD
public static final WebSocketError INSUFFICIENT_MEMORY_FOR_PAYLOAD
public static final WebSocketError INTERRUPTED_IN_READING
public static final WebSocketError IO_ERROR_IN_READING
public static final WebSocketError IO_ERROR_IN_WRITING
public static final WebSocketError FLUSH_ERROR
public static final WebSocketError NON_ZERO_RESERVED_BITS
From RFC 6455, 5.2 Base Framing Protocol; RSV1, RSV2, RSV3:
MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. If a nonzero value is received and none of the negotiated extensions defines the meaning of such a nonzero value, the receiving endpoint MUST Fail the WebSocket Connection.
By calling WebSocket.setExtended(true), you can skip the validity check of the RSV1/RSV2/RSV3 bits.
public static final WebSocketError FRAME_MASKED
From RFC 6455, 5.1. Overview:
A server MUST NOT mask any frames that it sends to the client. A client MUST close a connection if it detects a masked frame.
public static final WebSocketError UNKNOWN_OPCODE
By calling WebSocket.setExtended(true), you can accept frames which have an unknown opcode.
public static final WebSocketError FRAGMENTED_CONTROL_FRAME
From RFC 6455, 5.4. Fragmentation:
Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. Control frames themselves MUST NOT be fragmented.
public static final WebSocketError UNEXPECTED_CONTINUATION_FRAME
public static final WebSocketError CONTINUATION_NOT_CLOSED
public static final WebSocketError TOO_LONG_CONTROL_FRAME_PAYLOAD
From RFC 6455, 5.5. Control Frames:
All control frames MUST have a payload length of 125 bytes or less and MUST NOT be fragmented.
public static final WebSocketError MESSAGE_CONSTRUCTION_ERROR
public static final WebSocketError TEXT_MESSAGE_CONSTRUCTION_ERROR
public static final WebSocketError UNEXPECTED_ERROR_IN_READING_THREAD
public static final WebSocketError UNEXPECTED_ERROR_IN_WRITING_THREAD
public static WebSocketError[] values()
for (WebSocketError c : WebSocketError.values()) System.out.println(c);
public static WebSocketError valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2015. All rights reserved.