Brooklyn

brooklyn.entity.drivers.downloads
[Java] Interface DownloadResolver


public interface DownloadResolver

Gives download details for an entity or an entity add-on. Returned by the DownloadResolverManager, when queried for a specific entity or entity add-on.

Authors:
aled


Method Summary
java.lang.String getFilename()

The name of the artifact.

java.util.List getTargets()

The targets (normally URLs) for downloading the artifact.

java.lang.String getUnpackedDirectoryName(java.lang.String defaultVal)

The name of the directory in the expanded artifact (e.g. if it's a tar.gz file then the name of the directory within it).

 

Method Detail

getFilename

public java.lang.String getFilename()
The name of the artifact. The caller is free to use this name, or not. But using this name gives consistency particularly between brooklyn local-repos and brooklyn install directories.


getTargets

public java.util.List getTargets()
The targets (normally URLs) for downloading the artifact. These should be tried in-order until one works.


getUnpackedDirectoryName

@Beta
public java.lang.String getUnpackedDirectoryName(java.lang.String defaultVal)
The name of the directory in the expanded artifact (e.g. if it's a tar.gz file then the name of the directory within it). If no value is known, the defaultVal will be returned. This can return null if the artifact is not an archive (and if defaultVal is null). TODO The driver needs to know what will happen when an install archive is unpacked (e.g. an AS7 install tgz may be automatically expanded into a directory named "jboss-as-7.1.1-FINAL"). However, it's unclear where the best place to encode that is. The driver supplying the default seems sensible.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.