Interface JdbcDriverDownloader.ProgressListener
-
- All Known Implementing Classes:
JdbcDriverDownloadProgressListener
- Enclosing class:
- JdbcDriverDownloader
public static interface JdbcDriverDownloader.ProgressListenerDownload progress listener.
- Since:
- 2018.1
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbytesDownloaded(int len)Signals that number of bytes downloaded should be incremented bylen.ProgressInfogetProgress()Returns the progress of the download process.voidnewFileStarted(String fileName, long fileLength)Signals that a new file has started downloading.voidsetFileCount(int fileCount)Updates the number of files to be downloaded.
-
-
-
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- iffileCount <= 0.IllegalStateException- iffileCounthas 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- iflen < 0.
-
getProgress
@NotNull ProgressInfo getProgress()
Returns the progress of the download process.
- Returns:
- the progress of the download process.
-
-