public static WebSocketCloseStatus valueOf(int code) {
        switch (code) {
            case 1000:
                return NORMAL_CLOSURE;
            case 1001:
                return ENDPOINT_UNAVAILABLE;
            case 1002:
                return PROTOCOL_ERROR;
            case 1003:
                return INVALID_MESSAGE_TYPE;
            case 1005:
                return EMPTY;
            case 1006:
                return ABNORMAL_CLOSURE;
            case 1007:
                return INVALID_PAYLOAD_DATA;
            case 1008:
                return POLICY_VIOLATION;
            case 1009:
                return MESSAGE_TOO_BIG;
            case 1010:
                return MANDATORY_EXTENSION;
            case 1011:
                return INTERNAL_SERVER_ERROR;
            case 1012:
                return SERVICE_RESTART;
            case 1013:
                return TRY_AGAIN_LATER;
            case 1014:
                return BAD_GATEWAY;
            case 1015:
                return TLS_HANDSHAKE_FAILED;
            default:
                if (!isValidStatusCode(code)) {
                    throw new IllegalArgumentException(
                            "WebSocket close status code does NOT comply with RFC 6455: " + code);
                }
                return new WebSocketCloseStatus(code, "Close status #" + code);
        }
    }
Returns a {@link WebSocketCloseStatus} with the {@code code}. If the {@code code} is not predefined,
a new instance is created.
core/src/main/java/com/linecorp/armeria/common/websocket/WebSocketCloseStatus.java