public void startDownloading(ThreadPoolExecutor executorService) {
    if (this.started) throw new IllegalStateException("Cannot start download job that has already started");
    this.started = true;

    if (this.allFiles.isEmpty()) {
      //Launcher.getInstance().println("Download job '" + this.name + "' skipped as there are no files to download");
      this.listener.onDownloadJobFinished(this);
    } else {
      int threads = executorService.getMaximumPoolSize();
      this.remainingThreads.set(threads);
      //Launcher.getInstance().println("Download job '" + this.name + "' started (" + threads + " threads, " + this.allFiles.size() + " files)");
      for (int i = 0; i < threads; i++)
        executorService.submit(new Runnable()
        {
          public void run() {
            DownloadJob.this.popAndDownload();
          }
        });
    }
  }