Interface BackgroundTransfer.Listener

Enclosing class:
BackgroundTransfer

public static interface BackgroundTransfer.Listener
Receives transfer progress and completion on the EDT.
  • Method Details

    • onProgress

      void onProgress(BackgroundTransfer.Transfer transfer, long done, long total)

      Called as bytes move.

      Parameters
      • transfer: the transfer

      • done: bytes transferred so far

      • total: total bytes, or -1 when unknown

    • onComplete

      void onComplete(BackgroundTransfer.Transfer transfer, boolean success, int status)

      Called once when the transfer ends.

      Parameters
      • transfer: the transfer

      • success: true when the server answered with a 2xx status

      • status: the HTTP status, or -1 for a network error or cancel