Class JdbcDriverDownloadProgressListener
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.JdbcDriverDownloadProgressListener
-
- All Implemented Interfaces:
JdbcDriverDownloader.ProgressListener
@ThreadSafe public final class JdbcDriverDownloadProgressListener extends Object implements JdbcDriverDownloader.ProgressListener
The default implementation of
JdbcDriverDownloader.ProgressListener.- Since:
- 2018.1
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Constructor Summary
Constructors Constructor Description JdbcDriverDownloadProgressListener()
-
Method Summary
All Methods Instance Methods Concrete 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
public void setFileCount(@Nonnegative int fileCount)
Updates the number of files to be downloaded. Should only be invoked once.
- Specified by:
setFileCountin interfaceJdbcDriverDownloader.ProgressListener- Parameters:
fileCount- the number of files to be downloaded.- See Also:
JdbcDriverDownloader.ProgressListener.setFileCount(int)
-
newFileStarted
public void newFileStarted(@NotNull String fileName, @Nonnegative long fileLength)Signals that a new file has started downloading.
- Specified by:
newFileStartedin interfaceJdbcDriverDownloader.ProgressListener- Parameters:
fileName- the basename if the file (without path).fileLength- the length of the file, in bytes.- See Also:
JdbcDriverDownloader.ProgressListener.newFileStarted(String, long)
-
bytesDownloaded
public void bytesDownloaded(@Nonnegative int len)
Signals that number of bytes downloaded should be incremented by
len.- Specified by:
bytesDownloadedin interfaceJdbcDriverDownloader.ProgressListener- Parameters:
len- the increment value.- See Also:
JdbcDriverDownloader.ProgressListener.bytesDownloaded(int)
-
getProgress
@NotNull public ProgressInfo getProgress()
Returns the progress of the download process.
- Specified by:
getProgressin interfaceJdbcDriverDownloader.ProgressListener- Returns:
- the progress of the download process.
- See Also:
JdbcDriverDownloader.ProgressListener.getProgress()
-
-