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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
bytesDownloaded(int len)
Signals that number of bytes downloaded should be incremented bylen
.ProgressInfo
getProgress()
Returns the progress of the download process.void
newFileStarted(String fileName, long fileLength)
Signals that a new file has started downloading.void
setFileCount(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
- iffileCount
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
- iflen < 0
.
-
getProgress
@NotNull ProgressInfo getProgress()
Returns the progress of the download process.
- Returns:
- the progress of the download process.
-
-