Examples of BundleInfo


Examples of org.emrys.webosgi.launcher.configurator.utils.BundleInfo

  }

  private Collection uninstallBundles(HashSet toUninstall) {
    Collection removedBundles = new ArrayList(toUninstall.size());
    for (Iterator iterator = toUninstall.iterator(); iterator.hasNext();) {
      BundleInfo current = (BundleInfo) iterator.next();
      Bundle[] matchingBundles = packageAdminService.getBundles(current
          .getSymbolicName(), getVersionRange(current.getVersion()));
      for (int j = 0; matchingBundles != null
          && j < matchingBundles.length; j++) {
        try {
          removedBundles.add(matchingBundles[j]);
          matchingBundles[j].uninstall();
View Full Code Here

Examples of org.jboss.osgi.spi.BundleInfo

            return false;
        }
    }

    private ServiceName installBundleFromURL(BundleManagerService bundleManager, URL bundleURL, Integer startLevel) throws Exception {
        BundleInfo info = BundleInfo.createBundleInfo(bundleURL);
        Deployment dep = DeploymentFactory.createDeployment(info);
        if (startLevel != null) {
            dep.setStartLevel(startLevel.intValue());
        }
        return bundleManager.installBundle(serviceTarget, dep);
View Full Code Here

Examples of org.jboss.osgi.spi.BundleInfo

        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final String contextName = deploymentUnit.getName();
        final ServiceRegistry serviceRegistry = phaseContext.getServiceRegistry();

        // Check if we already have a BundleInfo
        BundleInfo info = BundleInfoAttachment.getBundleInfo(deploymentUnit);
        ServiceController<Deployment> deploymentController = DeploymentHolderService.getDeployment(serviceRegistry, contextName);
        if (info != null || deploymentController != null)
            return;

        // Get the manifest from the deployment's virtual file
View Full Code Here

Examples of org.jboss.osgi.spi.BundleInfo

                controller.setMode(Mode.REMOVE);
            }
        }

        // Check for attached BundleInfo
        BundleInfo info = BundleInfoAttachment.getBundleInfo(depUnit);
        if (deployment == null && info != null) {
            deployment = DeploymentFactory.createDeployment(info);
            deployment.addAttachment(BundleInfo.class, info);
            deployment.setAutoStart(true);
        }
View Full Code Here

Examples of org.jboss.osgi.spi.BundleInfo

        ZipExporter exporter = archive.as(ZipExporter.class);
        return AbstractVFS.toVirtualFile(archive.getName(), exporter.exportAsInputStream());
    }

    private BundleHandle installBundle(String location, VirtualFile virtualFile) throws BundleException, IOException {
        BundleInfo info = BundleInfo.createBundleInfo(virtualFile);
        URL streamURL = info.getRoot().getStreamURL();
        return installBundle(location, streamURL);
    }
View Full Code Here

Examples of org.jboss.osgi.spi.util.BundleInfo

        OSGiMetaData metadata = getModuleMetadata(module);
        return bundleManager.registerModule(serviceTarget, module, metadata);
    }

    private ServiceName installBundleFromURL(BundleManagerService bundleManager, URL moduleURL, Integer startLevel) throws Exception {
        BundleInfo info = BundleInfo.createBundleInfo(moduleURL);
        Deployment dep = DeploymentFactory.createDeployment(info);
        if (startLevel != null) {
            dep.setStartLevel(startLevel.intValue());
        }
        return bundleManager.installBundle(serviceTarget, dep);
View Full Code Here

Examples of org.jboss.osgi.spi.util.BundleInfo

                controller.setMode(Mode.REMOVE);
            }
        }

        // Check for attached BundleInfo
        BundleInfo info = BundleInfoAttachment.getBundleInfo(deploymentUnit);
        if (deployment == null && info != null) {
            deployment = DeploymentFactory.createDeployment(info);
            deployment.addAttachment(BundleInfo.class, info);
            deployment.setAutoStart(true);
            OSGiDeploymentAttachment.attachDeployment(deploymentUnit, deployment);
View Full Code Here

Examples of org.jboss.osgi.spi.util.BundleInfo

                ServiceName serviceName;
                ModuleIdentifier identifier = moduleMetaData.getIdentifier();
                File bundleFile = getRepositoryEntry(bundlesDir, identifier);
                if (bundleFile != null) {
                    URL url = bundleFile.toURI().toURL();
                    BundleInfo info = BundleInfo.createBundleInfo(url);
                    Deployment dep = DeploymentFactory.createDeployment(info);
                    dep.setAutoStart(moduleMetaData.isStart());
                    serviceName = bundleManager.installBundle(serviceTarget, dep);
                }
                else {
View Full Code Here

Examples of org.jboss.osgi.spi.util.BundleInfo

            return false;
        }
    }

    private ServiceName installBundleFromURL(BundleManagerService bundleManager, URL bundleURL, Integer startLevel) throws Exception {
        BundleInfo info = BundleInfo.createBundleInfo(bundleURL);
        Deployment dep = DeploymentFactory.createDeployment(info);
        if (startLevel != null) {
            dep.setStartLevel(startLevel.intValue());
        }
        return bundleManager.installBundle(serviceTarget, dep);
View Full Code Here

Examples of org.jboss.osgi.spi.util.BundleInfo

        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final String contextName = deploymentUnit.getName();
        final ServiceRegistry serviceRegistry = phaseContext.getServiceRegistry();

        // Check if we already have an OSGi deployment
        BundleInfo info = BundleInfoAttachment.getBundleInfo(deploymentUnit);
        ServiceController<Deployment> deploymentController = DeploymentHolderService.getDeployment(serviceRegistry, contextName);
        if (info != null || deploymentController != null)
            return;

        // Get the manifest from the deployment's virtual file
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.