/** * Scans the given directory for OSGi bundles and regular JARs and fills the given lists appropriately. * * @param root the directory to recursively scan * @param bundles the list to fill with found bundles * @param ljars the list to fill with found jars */ public void scan(File root, List<BundleFile> bundles, List<BundleFile> ljars) { BundleFileScanner callback = new BundleFileScanner(bundles, ljars); BundleWalker visitor = new BundleWalker(callback, patterns); visitor.visit(root); }
/** * Installs all bundles found in the given directory. * <p> * The directory is recursively searched for bundles. * * @param root the tree root */ public void install(File root) { BundleInstaller callback = new BundleInstaller(); BundleWalker visitor = new BundleWalker(callback, patterns); visitor.visit(root); }
/** * Scans and loads the given directory for OSGi bundles and regular JARs and fills the given lists appropriately. * <p> * Loading means registering with the given shared class loader each bundle found. * * @param root the directory to recursively scan * @param bundles the list to fill with found bundles * @param jars the list to fill with found jars */ public void load(File root, List<BundleFile> bundles, List<BundleFile> jars) { BundleFileLoader callback = new BundleFileLoader(bundles, jars); BundleWalker visitor = new BundleWalker(callback, patterns); visitor.visit(root); }