Class HttpResourceProvider
java.lang.Object
wtf.ranked.hytale.server.runner.resource.ResourceProvider
wtf.ranked.hytale.server.runner.resource.HttpResourceProvider
- All Implemented Interfaces:
org.gradle.api.services.BuildService<HytaleExtensionParameters>
HTTP implementation of the ResourceProvider.
Uses the native Java HttpClient to perform
asynchronous file downloads with redirect support and custom timeouts.
-
Nested Class Summary
Nested classes/interfaces inherited from class ResourceProvider
ResourceProvider.ResourceRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidprovide(@NonNull ResourceProvider.ResourceRequest request) Executes an HTTP GET request and streams the response directly to a file.Methods inherited from class ResourceProvider
builderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.services.BuildService
getParameters
-
Constructor Details
-
HttpResourceProvider
public HttpResourceProvider()
-
-
Method Details
-
provide
protected final void provide(@NonNull ResourceProvider.ResourceRequest request) throws ResourceDownloadException Executes an HTTP GET request and streams the response directly to a file.- Specified by:
providein classResourceProvider- Parameters:
request- the URI and destination file details- Throws:
ResourceDownloadException
-