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 voidfetchCachedContentToFile(File cachedFile, File destination, String artifactUrl, ArtifactInfo artifactInfo)Restore cached on the agent content to file.voidfetchContentToFile(File destination, String artifactUrl)Download url target to file.voidinterrupt()Can be called from outside to interrupt fetching of a file contentstatic booleanisRecoverable(IOException exception)protected ResolvingFailedExceptionwrapWithResolvingFailed(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 ResolvingFailedExceptionDescription copied from interface:ContentFetcherDownload url target to file.- Specified by:
fetchContentToFilein interfaceContentFetcher- Parameters:
destination- destination file.- Throws:
ResolvingFailedException
-
fetchCachedContentToFile
public void fetchCachedContentToFile(@NotNull File cachedFile, @NotNull File destination, @NotNull String artifactUrl, @NotNull ArtifactInfo artifactInfo) throws IOExceptionDescription copied from interface:ContentFetcherRestore cached on the agent content to file.- Specified by:
fetchCachedContentToFilein 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:ContentFetcherCan be called from outside to interrupt fetching of a file content- Specified by:
interruptin interfaceContentFetcher
-
wrapWithResolvingFailed
protected ResolvingFailedException wrapWithResolvingFailed(IOException e)
-
isRecoverable
public static boolean isRecoverable(IOException exception)
-
-