本文整理了Java中org.apache.brooklyn.core.entity.Entities.newDownloader()
方法的一些代码示例,展示了Entities.newDownloader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entities.newDownloader()
方法的具体详情如下:
包路径:org.apache.brooklyn.core.entity.Entities
类名称:Entities
方法名:newDownloader
暂无
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
public static DownloadResolver newDownloader(EntityDriver driver) {
return newDownloader(driver, ImmutableMap.<String,Object>of());
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
public static DownloadResolver newDownloader(EntityDriver driver, String addon) {
return newDownloader(driver, addon, ImmutableMap.<String,Object>of());
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-webapp
@Override
public void prepare() {
resolver = Entities.newDownloader(this);
setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("jboss-as-%s", getVersion()))));
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-database
@Override
public void prepare() {
resolver = Entities.newDownloader(this, ImmutableMap.of("filename", getInstallFilename()));
setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("mariadb-%s-%s", getVersion(), getOsTag()))));
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-database
@Override
public void prepare() {
resolver = Entities.newDownloader(this);
String unpackedDirectoryName = resolver.getUnpackedDirectoryName(getDefaultUnpackedDirectoryName());
setExpandedInstallDir(Os.mergePaths(getInstallDir(), unpackedDirectoryName));
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-base
private void runTestGeneratesCorrectDownloadUrl(String version, String expectedUrl) throws Exception {
// TODO Using BrooklynNodeImpl directly, because want to instantiate a BroolynNodeSshDriver.
// Really want to make that easier to test, without going through "wrong" code path for creating entity.
BrooklynNode entity = app.addChild(EntitySpec.create(BrooklynNode.class)
.configure(BrooklynNode.SUGGESTED_VERSION, version));
BrooklynNodeImpl entityImpl = (BrooklynNodeImpl) Entities.deproxy(entity);
ConfigToAttributes.apply(entity);
BrooklynNodeSshDriver driver = new BrooklynNodeSshDriver(entityImpl, loc);
DownloadResolver resolver = Entities.newDownloader(driver);
List<String> urls = resolver.getTargets();
System.out.println("urls=" + urls);
assertTrue(urls.contains(expectedUrl), "urls=" + urls);
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-base
@Override
public void prepare() {
// Check if we should create a download resolver?
String downloadUrl = getEntity().config().get(SoftwareProcess.DOWNLOAD_URL);
if (Strings.isNonEmpty(downloadUrl)) {
resolver = Entities.newDownloader(this);
String formatString = getArchiveNameFormat();
if (Strings.isNonEmpty(formatString)) {
setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(String.format(formatString, getVersion()))));
} else {
setExpandedInstallDir(getInstallDir());
}
}
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-software-base
Maybe<Object> url = ((EntityInternal)getEntity()).config().getRaw(SoftwareProcess.DOWNLOAD_URL);
if (url.isPresentAndNonNull()) {
DownloadResolver resolver = Entities.newDownloader(this);
List<String> urls = resolver.getTargets();
downloadedFilename = resolver.getFilename();
内容来源于网络,如有侵权,请联系作者删除!