Examples of DownloadStrategy


Examples of io.fabric8.process.manager.DownloadStrategy

        // lets check we're in an active profile and not in a test case that has no profile
        if (fabricService != null) {
            Container container = fabricService.getCurrentContainer();
            if (container != null) {
                final DownloadManager downloadManager = DownloadManagers.createDownloadManager(fabricService, downloadExecutor);
                return new DownloadStrategy() {
                    @Override
                    public File downloadContent(URL sourceUrl, File installDir) throws IOException {
                        DownloadFuture future = downloadManager.download(sourceUrl.toString());
                        File file = AgentUtils.waitForFileDownload(future);
                        if (file != null && file.exists() && file.isFile()) {
View Full Code Here

Examples of io.fabric8.process.manager.DownloadStrategy

        };
        return installViaScript(options, installTask);
    }

    protected DownloadStrategy getDownloadStrategy(InstallOptions options) {
        DownloadStrategy answer = options.getDownloadStrategy();
        if (answer == null) {
            answer = createDeafultDownloadStrategy();
        }
        return answer;
    }
View Full Code Here

Examples of io.fabric8.process.manager.DownloadStrategy

        installation.getController().install();
        return installation;
    }

    protected DownloadStrategy createDeafultDownloadStrategy() {
        return new DownloadStrategy() {
            @Override
            public File downloadContent(final URL sourceUrl, final File installDir) throws IOException {
                // copy the URL to the install dir
                File archive = new File(installDir, INSTALLED_BINARY);
                Files.copy(new InputSupplier<InputStream>() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.