@Experimental public enum WebSocketCloseCode extends Enum<WebSocketCloseCode>
WebSocket| Enum Constant and Description |
|---|
ENDPOINT_GOING_DOWN
Indicates that an endpoint is "going away", such as a server going down, or a browser having navigated away from
a page.
|
INVALID_DATA
Indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept
(e.g.
|
MESSAGE_TOO_LARGE
indicates that an endpoint is terminating the connection because it has received a message that is too large.
|
NORMAL_CLOSURE
Indicates a normal closure, meaning whatever purpose the connection was established for has been fulfilled.
|
PROTOCOL_ERROR
Indicates that an endpoint is terminating the connection due to a protocol error.
|
| Modifier and Type | Method and Description |
|---|---|
static WebSocketCloseCode |
fromProtocolCode(int protocolCode)
Returns the
WebSocketCloseCode that matches the given raw protocolCode |
int |
getProtocolCode() |
static WebSocketCloseCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WebSocketCloseCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WebSocketCloseCode NORMAL_CLOSURE
public static final WebSocketCloseCode ENDPOINT_GOING_DOWN
public static final WebSocketCloseCode PROTOCOL_ERROR
public static final WebSocketCloseCode INVALID_DATA
public static final WebSocketCloseCode MESSAGE_TOO_LARGE
public static WebSocketCloseCode[] values()
for (WebSocketCloseCode c : WebSocketCloseCode.values()) System.out.println(c);
public static WebSocketCloseCode 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 nullpublic static WebSocketCloseCode fromProtocolCode(int protocolCode)
WebSocketCloseCode that matches the given raw protocolCodeprotocolCode - a protocol level codeWebSocketCloseCodeIllegalArgumentException - if the protocolCode doesn't match any of the items in this enumpublic int getProtocolCode()
Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.