Interface ProgressReport

All Known Implementing Classes:
LoggingProgressReport, SilentProgressReport

public interface ProgressReport
Progress report of a file download operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Triggered to signal completion of the download operation.
    void
    Triggered to signal an error occurred during the download operation.
    void
    initiate(URI uri, long total)
    Triggered to signal initiation of a download operation.
    void
    update(long bytesRead)
    Triggered to signal successful retrieval of a chunk of the resource content.
  • Method Details

    • initiate

      void initiate(URI uri, long total)
      Triggered to signal initiation of a download operation.
      Parameters:
      uri - the URI of the resource being downloaded
      total - the total length of resource content.
    • update

      void update(long bytesRead)
      Triggered to signal successful retrieval of a chunk of the resource content.
      Parameters:
      bytesRead - the number of bytes retrieved.
    • completed

      void completed()
      Triggered to signal completion of the download operation.
    • error

      void error(Exception ex)
      Triggered to signal an error occurred during the download operation.