Interface JdbcDriverDownloader.ProgressListener

  • All Known Implementing Classes:
    JdbcDriverDownloadProgressListener
    Enclosing class:
    JdbcDriverDownloader

    public static interface JdbcDriverDownloader.ProgressListener

    Download progress listener.

    Since:
    2018.1
    Author:
    Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
    • Method Detail

      • setFileCount

        void setFileCount​(@Nonnegative
                          int fileCount)

        Updates the number of files to be downloaded. Should only be invoked once.

        Parameters:
        fileCount - the number of files to be downloaded.
        Throws:
        IllegalArgumentException - if fileCount <= 0.
        IllegalStateException - if fileCount has already been set.
      • newFileStarted

        void newFileStarted​(@NotNull
                            String fileName,
                            @Nonnegative
                            long fileLength)

        Signals that a new file has started downloading.

        Parameters:
        fileName - the basename if the file (without path).
        fileLength - the length of the file, in bytes.
      • bytesDownloaded

        void bytesDownloaded​(@Nonnegative
                             int len)

        Signals that number of bytes downloaded should be incremented by len.

        Parameters:
        len - the increment value.
        Throws:
        IllegalArgumentException - if len < 0.
      • getProgress

        @NotNull
        ProgressInfo getProgress()

        Returns the progress of the download process.

        Returns:
        the progress of the download process.