Class BaseResourceDownloader
java.lang.Object
net.adoptopenjdk.icedteaweb.resources.downloader.BaseResourceDownloader
- All Implemented Interfaces:
ResourceDownloader
- Direct Known Subclasses:
ExactVersionedResourceDownloader, RangeVersionedResourceDownloader, UnversionedResourceDownloader
Base class for resource downloader.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddownload()private CompletableFuture<Resource> downloadFrom(URL url) private static booleanendsWithBlankLine(String head) private voidprivate Stringprivate Stringprivate <R> Optional<R> futureToOptional(Future<R> future) private CloseableConnectiongetDownloadConnection(URL location) private DownloadDetailsgetDownloadDetails(CloseableConnection connection) private DownloadDetailsprivate intgetTimeValue(String key) protected abstract VersionIdgetVersion(URL downloadFrom, String versionHeaderValue) (package private) voidinvalidateExistingEntryInCache(VersionId version) protected abstract booleanisUpToDate(URL resourceHref, VersionId version, long lastModified) private Object[]private longprivate ResourcetryDownloading(URL downloadFrom) private longtryDownloading(DownloadDetails downloadDetails)
-
Field Details
-
LOG
-
resource
-
downloadUrls
-
downLoadExceptions
-
-
Constructor Details
-
BaseResourceDownloader
-
-
Method Details
-
download
- Specified by:
downloadin interfaceResourceDownloader
-
exceptionMessage
-
exceptionMessage
-
checkForProxyError
private void checkForProxyError() -
downloadFrom
-
tryDownloading
- Throws:
IOException
-
ensureRequestInterval
private void ensureRequestInterval() -
getDownloadConnection
- Throws:
IOException
-
getTimeValue
-
tryDownloading
- Throws:
IOException
-
getVersion
-
isUpToDate
-
getDownloadDetails
- Throws:
IOException
-
getInputStreamFromDirectSocket
- Throws:
IOException
-
loadUrlWithInvalidHeaderBytes
- Throws:
IOException
-
endsWithBlankLine
-
parseLong
-
futureToOptional
-
invalidateExistingEntryInCache
-