public class BasicDownloadsManager extends java.lang.Object implements DownloadResolverManager
DownloadResolverManager.DownloadRequirement, DownloadResolverManager.DownloadTargets
Constructor and Description |
---|
BasicDownloadsManager() |
Modifier and Type | Method and Description |
---|---|
static BasicDownloadsManager |
newDefault(StringConfigMap config)
The default is (in-order) to:
Use the local repo, if any (defaulting to $HOME/.brooklyn/repository)
Use brooklyn properties for any download overrides defined there (see
DownloadProducerFromProperties
Use the entity's Attributes.DOWNLOAD_URL
Use the cloudsoft fallback repo
|
DownloadResolver |
newDownloader(EntityDriver driver)
For installing the main entity.
|
DownloadResolver |
newDownloader(EntityDriver driver,
java.util.Map<java.lang.String,?> properties)
For installing the main entity.
|
DownloadResolver |
newDownloader(EntityDriver driver,
java.lang.String addonName,
java.util.Map<java.lang.String,?> addonProperties)
For installing an entity add-on.
|
static BasicDownloadsManager |
newEmpty() |
void |
registerFilenameProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,java.lang.String> producer)
Registers a producer for generating the expected filename of the download artifact.
|
void |
registerPrimaryProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,? extends DownloadResolverManager.DownloadTargets> producer)
Registers a producer, to be tried before all other producers.
|
void |
registerProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,? extends DownloadResolverManager.DownloadTargets> producer)
Registers a producer, to be tried after all other registered producers have been tried.
|
public static BasicDownloadsManager newDefault(StringConfigMap config)
DownloadProducerFromProperties
config
- public static BasicDownloadsManager newEmpty()
public void registerPrimaryProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,? extends DownloadResolverManager.DownloadTargets> producer)
DownloadResolverManager
BasicDownloadTargets.empty()
).registerPrimaryProducer
in interface DownloadResolverManager
registerResolver(Function)
public void registerProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,? extends DownloadResolverManager.DownloadTargets> producer)
DownloadResolverManager
BasicDownloadTargets.empty()
).registerProducer
in interface DownloadResolverManager
public void registerFilenameProducer(com.google.common.base.Function<? super DownloadResolverManager.DownloadRequirement,java.lang.String> producer)
DownloadResolverManager
resolve(EntityDriver)
result.registerFilenameProducer
in interface DownloadResolverManager
public DownloadResolver newDownloader(EntityDriver driver)
DownloadResolverManager
newDownloader
in interface DownloadResolverManager
public DownloadResolver newDownloader(EntityDriver driver, java.util.Map<java.lang.String,?> properties)
DownloadResolverManager
newDownloader
in interface DownloadResolverManager
public DownloadResolver newDownloader(EntityDriver driver, java.lang.String addonName, java.util.Map<java.lang.String,?> addonProperties)
DownloadResolverManager
newDownloader
in interface DownloadResolverManager