Class UpgradeFilesDownloaderImpl
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.upgrade.UpgradeFilesDownloaderImpl
-
- All Implemented Interfaces:
UpgradeFilesDownloader
public class UpgradeFilesDownloaderImpl extends Object implements UpgradeFilesDownloader
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com) Date: 02.09.11 19:44
-
-
Constructor Summary
Constructors Constructor Description UpgradeFilesDownloaderImpl(RecoverableFilesDownloader downloader, AgentConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentUpdateInfodownloadContentsXmlFile(File temp)Downloads server version statevoiddownloadObsoleteBuildAgentDistribution(File targetDir)Download buildAgent.zip file from server.voiddownloadUpdateFiles(File targetDir, String baseServerPath, Collection<FileInfo> pluginFiles)Downloads files from server
-
-
-
Constructor Detail
-
UpgradeFilesDownloaderImpl
public UpgradeFilesDownloaderImpl(@NotNull RecoverableFilesDownloader downloader, @NotNull AgentConfiguration config)
-
-
Method Detail
-
downloadUpdateFiles
public void downloadUpdateFiles(@NotNull File targetDir, @NotNull String baseServerPath, @NotNull Collection<FileInfo> pluginFiles) throws UpgradeFailedExceptionDescription copied from interface:UpgradeFilesDownloaderDownloads files from server- Specified by:
downloadUpdateFilesin interfaceUpgradeFilesDownloader- Parameters:
targetDir- directory to put files on agentbaseServerPath- prefix path to be added to everyFileInfo.getName()pluginFiles- list of plugins to download- Throws:
UpgradeFailedException- on download or other IO error
-
downloadObsoleteBuildAgentDistribution
public void downloadObsoleteBuildAgentDistribution(@NotNull File targetDir) throws UpgradeFailedExceptionDescription copied from interface:UpgradeFilesDownloaderDownload buildAgent.zip file from server. This method is done for old servers compatibility- Specified by:
downloadObsoleteBuildAgentDistributionin interfaceUpgradeFilesDownloader- Parameters:
targetDir- directory to download the file- Throws:
UpgradeFailedException- on download or other IO error
-
downloadContentsXmlFile
@Nullable public AgentUpdateInfo downloadContentsXmlFile(@NotNull File temp) throws UpgradeFailedException
Description copied from interface:UpgradeFilesDownloaderDownloads server version state- Specified by:
downloadContentsXmlFilein interfaceUpgradeFilesDownloader- Returns:
- agent updeate info or null if it failed to fetch one
- Throws:
UpgradeFailedException
-
-