Interface ArtifactProvider
@ConsumerType
public interface ArtifactProvider
The artifact provider is an extension point for providing artifacts
from different sources, like for example s3.
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifact
(String url, String relativeCachePath) Get a local file for the artifact URL.The protocol name of the provider, e.g.void
init
(ArtifactProviderContext context) Initialize the provider.void
shutdown()
Shutdown the provider.
-
Method Details
-
getProtocol
String getProtocol()The protocol name of the provider, e.g. "s3"- Returns:
- The protocol name.
-
init
Initialize the provider.- Parameters:
context
- The context- Throws:
IOException
- If the provider can't be initialized.
-
shutdown
void shutdown()Shutdown the provider. -
getArtifact
Get a local file for the artifact URL.- Parameters:
url
- Artifact urlrelativeCachePath
- A relative path that can be used as a cache path by the provider. The path does not start with a slash.- Returns:
- A local url if the artifact exists or
null
-