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 AgentUpdateInfo
downloadContentsXmlFile(File temp)
Downloads server version statevoid
downloadObsoleteBuildAgentDistribution(File targetDir)
Download buildAgent.zip file from server.void
downloadUpdateFiles(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 UpgradeFailedException
Description copied from interface:UpgradeFilesDownloader
Downloads files from server- Specified by:
downloadUpdateFiles
in 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 UpgradeFailedException
Description copied from interface:UpgradeFilesDownloader
Download buildAgent.zip file from server. This method is done for old servers compatibility- Specified by:
downloadObsoleteBuildAgentDistribution
in 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:UpgradeFilesDownloader
Downloads server version state- Specified by:
downloadContentsXmlFile
in interfaceUpgradeFilesDownloader
- Returns:
- agent updeate info or null if it failed to fetch one
- Throws:
UpgradeFailedException
-
-