public abstract static class AgentUtils.ArtifactDownloader<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ConcurrentMap<java.lang.String,T> |
artifacts |
protected java.util.List<java.lang.Throwable> |
errors |
protected java.util.concurrent.ConcurrentMap<java.lang.String,DownloadFuture> |
futures |
protected java.lang.Object |
lock |
protected DownloadManager |
manager |
protected java.util.concurrent.atomic.AtomicInteger |
pendings |
Constructor and Description |
---|
AgentUtils.ArtifactDownloader(DownloadManager manager) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,T> |
await() |
void |
download(java.lang.Iterable<java.lang.String> uris) |
DownloadFuture |
download(java.lang.String uri) |
void |
download(java.lang.String uri,
AgentUtils.DownloadCallback callback) |
protected abstract T |
getArtifact(java.lang.String uri,
java.io.File file) |
protected void |
onDownloaded(DownloadFuture future,
AgentUtils.DownloadCallback callback) |
protected final DownloadManager manager
protected final java.lang.Object lock
protected final java.util.concurrent.ConcurrentMap<java.lang.String,DownloadFuture> futures
protected final java.util.concurrent.ConcurrentMap<java.lang.String,T> artifacts
protected final java.util.List<java.lang.Throwable> errors
protected final java.util.concurrent.atomic.AtomicInteger pendings
public AgentUtils.ArtifactDownloader(DownloadManager manager)
public void download(java.lang.String uri, AgentUtils.DownloadCallback callback) throws java.net.MalformedURLException
java.net.MalformedURLException
public DownloadFuture download(java.lang.String uri) throws java.net.MalformedURLException
java.net.MalformedURLException
protected void onDownloaded(DownloadFuture future, AgentUtils.DownloadCallback callback)
protected abstract T getArtifact(java.lang.String uri, java.io.File file) throws java.lang.Exception
java.lang.Exception
public void download(java.lang.Iterable<java.lang.String> uris) throws java.net.MalformedURLException
java.net.MalformedURLException
public java.util.Map<java.lang.String,T> await() throws java.lang.InterruptedException, MultiException
java.lang.InterruptedException
MultiException
Copyright © 2014 Red Hat. All Rights Reserved.