public List<Bundle> installBundles(FileReference reference, Osgi osgi) throws InterruptedException {
        File file = fileAcquirer.waitFor(reference, 7, TimeUnit.DAYS);

        if (notReadable(file)) {
            // Wait a few sec in case FileAcquirer returns right before the file is actually ready.
            // This happened on rare occasions due to a (fixed) bug in file distribution.
            log.warning("Unable to open bundle file with reference '" + reference + "'. Waiting for up to 5 sec.");
            int retries = 0;
            while (notReadable(file) && retries < 10) {
                Thread.sleep(500);
                retries++;
            }
            if (notReadable(file)) {
                com.yahoo.protect.Process.logAndDie("Shutting down - unable to read bundle file with reference '" +
                                                    reference + "' and path " + file.getAbsolutePath());
            }
        }

        return osgi.install(file.getAbsolutePath());
    }
Retrieves bundles with file distribution, and installs them to the OSGi framework.

@author gjoranv
container-core/src/main/java/com/yahoo/container/core/config/FileAcquirerBundleInstaller.java