Class FilesystemTransportFactory.FilesystemTransport
- java.lang.Object
-
- jetbrains.buildServer.artifacts.impl.FilesystemTransportFactory.FilesystemTransport
-
- All Implemented Interfaces:
URLContentRetriever
- Enclosing class:
- FilesystemTransportFactory
public static class FilesystemTransportFactory.FilesystemTransport extends Object implements URLContentRetriever
-
-
Constructor Summary
Constructors Constructor Description FilesystemTransport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcutProtocol(String url)StringdownloadUrlTo(String url, File target)Download artifact to given location.StringgetDigest(String url)Retrieve content's digest.voidinterrupt()Interrupt operation.booleanisInterrupted()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.artifacts.URLContentRetriever
downloadCacheTo
-
-
-
-
Method Detail
-
downloadUrlTo
@NotNull public String downloadUrlTo(@NotNull String url, @NotNull File target) throws IOException
Description copied from interface:URLContentRetrieverDownload artifact to given location. Implementation is expected to write file only if the content was fetched successfully- Specified by:
downloadUrlToin interfaceURLContentRetriever- Parameters:
url- source url to get artifact fromtarget- target file location- Returns:
- digest of downloaded context, or null if the content can not be retrieved by this transport
- Throws:
IOException- if operation failed, can also throwRecoverableIOExceptionif operation can be repeated
-
getDigest
@NotNull public String getDigest(@NotNull String url) throws IOException
Description copied from interface:URLContentRetrieverRetrieve content's digest. The digest will be compared with locally stored value to see if content has changed and must be downloaded again.
Implementation is expected not to download whole content to get the digest.- Specified by:
getDigestin interfaceURLContentRetriever- Parameters:
url- source url of the artifact to retrieve digest for- Returns:
- the digest or null, if the digest can not be retrieved by this transport
- Throws:
IOException- if operation failed
-
interrupt
public void interrupt()
Description copied from interface:URLContentRetrieverInterrupt operation. Interrupts current transfer operation as early as possible. Will be called from external thread, so implementation should be thread-safe. Main thread is expected to throwResolvingInterruptedExceptionwhen interrupt is received- Specified by:
interruptin interfaceURLContentRetriever
-
isInterrupted
public boolean isInterrupted()
-
-