Class UrlResourceFetcher
java.lang.Object
io.github.ascopes.protobufmavenplugin.dependencies.UrlResourceFetcher
@Description("Fetches and downloads resources from URLs")
@Named
public final class UrlResourceFetcher
extends Object
Component that consumes URLs to obtain resources from remote locations.
- Since:
- 0.4.0
- Author:
- Ashley Scopes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final TemporarySpace
private static final int
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfetchFileFromUrl
(URL url, String extension) handleFileSystemUrl
(URL url) handleOtherUrl
(URL url, String extension) private Path
targetFile
(URL url, String extension)
-
Field Details
-
TIMEOUT
private static final int TIMEOUT- See Also:
-
USER_AGENT_HEADER
- See Also:
-
USER_AGENT_VALUE
-
log
private static final org.slf4j.Logger log -
temporarySpace
-
-
Constructor Details
-
UrlResourceFetcher
-
-
Method Details
-
fetchFileFromUrl
- Throws:
ResolutionException
-
handleFileSystemUrl
- Throws:
ResolutionException
-
handleOtherUrl
- Throws:
ResolutionException
-
targetFile
-