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 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
public void setFileCount(@Nonnegative int fileCount)
Updates the number of files to be downloaded. Should only be invoked once.
- Specified by:
setFileCount
in 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:
newFileStarted
in 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:
bytesDownloaded
in 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:
getProgress
in interfaceJdbcDriverDownloader.ProgressListener
- Returns:
- the progress of the download process.
- See Also:
JdbcDriverDownloader.ProgressListener.getProgress()
-
-