Class RecoverableContentFetcher
- java.lang.Object
-
- jetbrains.buildServer.artifacts.impl.RecoverableContentFetcher
-
- All Implemented Interfaces:
ContentFetcher
public class RecoverableContentFetcher extends Object implements ContentFetcher
Author: Nikita.Skvortsov Date: 2/14/11
-
-
Constructor Summary
Constructors Constructor Description RecoverableContentFetcher(URLContentRetriever transport, DownloadedArtifacts downloadedArtifacts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fetchCachedContentToFile(File cachedFile, File destination, String artifactUrl, ArtifactInfo artifactInfo)
Restore cached on the agent content to file.void
fetchContentToFile(File destination, String artifactUrl)
Download url target to file.void
interrupt()
Can be called from outside to interrupt fetching of a file contentstatic boolean
isRecoverable(IOException exception)
protected ResolvingFailedException
wrapWithResolvingFailed(IOException e)
-
-
-
Constructor Detail
-
RecoverableContentFetcher
public RecoverableContentFetcher(@NotNull URLContentRetriever transport, @NotNull DownloadedArtifacts downloadedArtifacts)
-
-
Method Detail
-
fetchContentToFile
public void fetchContentToFile(@NotNull File destination, @NotNull String artifactUrl) throws ResolvingFailedException
Description copied from interface:ContentFetcher
Download url target to file.- Specified by:
fetchContentToFile
in interfaceContentFetcher
- Parameters:
destination
- destination file.- Throws:
ResolvingFailedException
-
fetchCachedContentToFile
public void fetchCachedContentToFile(@NotNull File cachedFile, @NotNull File destination, @NotNull String artifactUrl, @NotNull ArtifactInfo artifactInfo) throws IOException
Description copied from interface:ContentFetcher
Restore cached on the agent content to file.- Specified by:
fetchCachedContentToFile
in interfaceContentFetcher
- Parameters:
cachedFile
- file that is cached on the agentdestination
- destination fileartifactUrl
- artifact locationartifactInfo
- information about the artifact- Throws:
IOException
-
interrupt
public void interrupt()
Description copied from interface:ContentFetcher
Can be called from outside to interrupt fetching of a file content- Specified by:
interrupt
in interfaceContentFetcher
-
wrapWithResolvingFailed
protected ResolvingFailedException wrapWithResolvingFailed(IOException e)
-
isRecoverable
public static boolean isRecoverable(IOException exception)
-
-