Interface DatasetDownloadService.DownloadCallback

Enclosing class:
DatasetDownloadService

public static interface DatasetDownloadService.DownloadCallback
Callback for UI-specific reactions to the download lifecycle. All methods are invoked on the main thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    The download was cancelled.
    default void
    onError(Dataset dataset, String message)
    The download or installation failed.
    default void
    onStarted(Dataset dataset, com.badlogic.gdx.Net.HttpRequest request)
    The download has started.
    default void
    onSuccess(Dataset dataset)
    The download, installation and enablement finished successfully.
  • Method Details

    • onStarted

      default void onStarted(Dataset dataset, com.badlogic.gdx.Net.HttpRequest request)
      The download has started.
      Parameters:
      dataset - The dataset.
      request - The HTTP request handling the download.
    • onSuccess

      default void onSuccess(Dataset dataset)
      The download, installation and enablement finished successfully.
      Parameters:
      dataset - The dataset.
    • onError

      default void onError(Dataset dataset, String message)
      The download or installation failed.
      Parameters:
      dataset - The dataset.
      message - The error message, may be null.
    • onCancelled

      default void onCancelled(Dataset dataset)
      The download was cancelled.
      Parameters:
      dataset - The dataset.