Examples of IVfsBundleFactory


Examples of org.overlord.commons.osgi.vfs.IVfsBundleFactory

        public Vfs.Dir createDir(URL url) {
            BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
            ServiceReference serviceReference = bundleContext.getServiceReference(IVfsBundleFactory.class.getName());
            if (serviceReference == null)
                throw new RuntimeException("OSGi Service Reference for [IVfsBundleFactory] not found."); //$NON-NLS-1$
            IVfsBundleFactory vfsBundleFactory = (IVfsBundleFactory) bundleContext.getService(serviceReference);
            VfsBundle bundle = vfsBundleFactory.getVfsBundle(url);
            File vfsFile = bundle.asFile(url);
            try {
                if (vfsFile.isFile()) {
                    return new ZipDir(vfsFile.toURI().toURL());
                }
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.