Package com.dtolabs.rundeck.core.common.impl

Examples of com.dtolabs.rundeck.core.common.impl.URLFileUpdaterBuilder


        String tempFileName = hashURL(url.toExternalForm()) + ".temp";
        File destinationTempFile = new File(cacheDir, tempFileName);
        File destinationCacheData = new File(cacheDir, tempFileName + ".cache.properties");

        //update from URL if necessary
        final URLFileUpdaterBuilder urlFileUpdaterBuilder = new URLFileUpdaterBuilder()
            .setUrl(url)
            .setAcceptHeader("*/*")
            .setTimeout(DEFAULT_TIMEOUT);
        if (USE_CACHE) {
            urlFileUpdaterBuilder
                .setCacheMetadataFile(destinationCacheData)
                .setCachedContent(destinationTempFile)
                .setUseCaching(true);
        }
        final URLFileUpdater updater = urlFileUpdaterBuilder.createURLFileUpdater();
        try {
            if (null != interaction) {
            //allow mock
                updater.setInteraction(interaction);
            }
View Full Code Here


        return Integer.toString(url.hashCode());
    }

    public INodeSet getNodes() throws ResourceModelSourceException {
        //update from URL if necessary
        final URLFileUpdaterBuilder urlFileUpdaterBuilder = new URLFileUpdaterBuilder()
            .setUrl(configuration.nodesUrl)
            .setAcceptHeader("*/*")
            .setTimeout(configuration.timeout);
        if (configuration.useCache) {
            urlFileUpdaterBuilder
                .setCacheMetadataFile(destinationCacheData)
                .setCachedContent(destinationTempFile)
                .setUseCaching(true);
        }
        final URLFileUpdater updater = urlFileUpdaterBuilder.createURLFileUpdater();
        try {
            if (null != interaction) {
                //allow mock
                updater.setInteraction(interaction);
            }
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.common.impl.URLFileUpdaterBuilder

Copyright © 2018 www.massapicom. 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.