java.lang.Object
io.jooby.WebSocketCloseStatus
Collection of websocket close status.
- Since:
- 2.2.0
- Author:
- edgar
-
Field Summary
Modifier and TypeFieldDescriptionstatic final WebSocketCloseStatus
1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message).static final int
1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message).static final WebSocketCloseStatus
1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.static final int
1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.static final WebSocketCloseStatus
1006 indicates that an endpoint is terminating the connection.static final int
1006 indicates that an endpoint is terminating the connection.static final WebSocketCloseStatus
1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.static final int
1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.static final WebSocketCloseStatus
1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).static final int
1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).static final WebSocketCloseStatus
1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.static final int
1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.static final WebSocketCloseStatus
1002 indicates that an endpoint is terminating the connection due to a protocol error.static final int
1002 indicates that an endpoint is terminating the connection due to a protocol error.static final WebSocketCloseStatus
1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.static final int
1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.static final WebSocketCloseStatus
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.static final int
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.static final WebSocketCloseStatus
1013 indicates that the service is experiencing overload.static final int
1013 indicates that the service is experiencing overload.static final WebSocketCloseStatus
1012 indicates that the service is restarted.static final int
1012 indicates that the service is restarted.static final WebSocketCloseStatus
1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.static final int
1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process. -
Constructor Summary
ConstructorDescriptionWebSocketCloseStatus
(int code, String reason) Creates a new websocket close status. -
Method Summary
-
Field Details
-
NORMAL_CODE
public static final int NORMAL_CODE1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.- See Also:
-
GOING_AWAY_CODE
public static final int GOING_AWAY_CODE1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.- See Also:
-
PROTOCOL_ERROR_CODE
public static final int PROTOCOL_ERROR_CODE1002 indicates that an endpoint is terminating the connection due to a protocol error.- See Also:
-
NOT_ACCEPTABLE_CODE
public static final int NOT_ACCEPTABLE_CODE1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).- See Also:
-
HARSH_DISCONNECT_CODE
public static final int HARSH_DISCONNECT_CODE1006 indicates that an endpoint is terminating the connection.- See Also:
-
BAD_DATA_CODE
public static final int BAD_DATA_CODE1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message).- See Also:
-
POLICY_VIOLATION_CODE
public static final int POLICY_VIOLATION_CODE1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy.- See Also:
-
TOO_BIG_TO_PROCESS_CODE
public static final int TOO_BIG_TO_PROCESS_CODE1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.- See Also:
-
REQUIRED_EXTENSION_CODE
public static final int REQUIRED_EXTENSION_CODE1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. The list of extensions that are needed SHOULD appear in the /reason/ part of the Close frame. Note that this status code is not used by the server, because it can fail the WebSocket handshake instead.- See Also:
-
SERVER_ERROR_CODE
public static final int SERVER_ERROR_CODE1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.- See Also:
-
SERVICE_RESTARTED_CODE
public static final int SERVICE_RESTARTED_CODE1012 indicates that the service is restarted. A client may reconnect, and if it chooses to do, should reconnect using a randomized delay of 5 - 30s.- See Also:
-
SERVICE_OVERLOAD_CODE
public static final int SERVICE_OVERLOAD_CODE1013 indicates that the service is experiencing overload. A client should only connect to a different IP (when there are multiple for the target) or reconnect to the same IP upon user action.- See Also:
-
NORMAL
1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled. -
GOING_AWAY
1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page. -
PROTOCOL_ERROR
1002 indicates that an endpoint is terminating the connection due to a protocol error. -
NOT_ACCEPTABLE
1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message). -
HARSH_DISCONNECT
1006 indicates that an endpoint is terminating the connection. -
BAD_DATA
1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message). -
POLICY_VIOLATION
1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy. -
TOO_BIG_TO_PROCESS
1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process. -
REQUIRED_EXTENSION
1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. The list of extensions that are needed SHOULD appear in the /reason/ part of the Close frame. Note that this status code is not used by the server, because it can fail the WebSocket handshake instead. -
SERVER_ERROR
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. -
SERVICE_RESTARTED
1012 indicates that the service is restarted. A client may reconnect, and if it chooses to do, should reconnect using a randomized delay of 5 - 30s. -
SERVICE_OVERLOAD
1013 indicates that the service is experiencing overload. A client should only connect to a different IP (when there are multiple for the target) or reconnect to the same IP upon user action.
-
-
Constructor Details
-
WebSocketCloseStatus
Creates a new websocket close status.- Parameters:
code
- Status code.reason
- Reason.
-
-
Method Details