Examples of BundleDescription


Examples of org.eclipse.osgi.service.resolver.BundleDescription

    }

    private BundleDescription addBundle(Dictionary enhancedManifest, File bundleLocation, boolean override)
        throws BundleException {

        BundleDescription descriptor =
            factory.createBundleDescription(state, enhancedManifest, bundleLocation.getAbsolutePath(), getNextId());

        setUserProperty(descriptor, PROP_MANIFEST, enhancedManifest);
        if (override) {
            BundleDescription[] conflicts = state.getBundles(descriptor.getSymbolicName());
            if (conflicts != null) {
                for (BundleDescription conflict : conflicts) {
                    state.removeBundle(conflict);
                    logger
                        .warn(conflict.toString() + " has been replaced by another bundle with the same symbolic name "
                            + descriptor.toString());
                }
            }
        }

        state.addBundle(descriptor);
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

    public Set<ResolverError> getAllErrors() {
        BundleDescription[] bundles = state.getBundles();
        Set<ResolverError> errors = new LinkedHashSet<ResolverError>();
        for (int i = 0; i < bundles.length; i++) {
            BundleDescription bundle = bundles[i];
            ResolverError[] bundleErrors = state.getResolverErrors(bundle);
            if (bundleErrors != null) {
                errors.addAll(Arrays.asList(bundleErrors));
            }
        }
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

        Set<Long> bundleIds = new LinkedHashSet<Long>();
        addBundleAndDependencies(desc, bundleIds, true);
        List<BundleDescription> dependencies = new ArrayList<BundleDescription>();
        for (long bundleId : bundleIds) {
            if (desc.getBundleId() != bundleId) {
                BundleDescription dependency = state.getBundle(bundleId);
                BundleDescription supplier = dependency.getSupplier().getSupplier();
                HostSpecification host = supplier.getHost();
                if (host == null || !desc.equals(host.getSupplier())) {
                    dependencies.add(dependency);
                }
            }
        }
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

  public Version getVersion() {
    return exportedPackage.getVersion();
  }

  public boolean isRemovalPending() {
    BundleDescription exporter = exportedPackage.getExporter();
    if (exporter != null)
      return exporter.isRemovalPending();
    return true;
  }
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

      return null;

    Class result = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size() && result == null; i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
        if (proxy == null)
          continue;
        result = proxy.getBundleLoader().findClass(name, true);
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

      return null;

    URL result = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size() && result == null; i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
      if (proxy == null)
        continue;
      result = proxy.getBundleLoader().findResource(name, true);
      if (result == null) {
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

      return null;

    Enumeration results = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size(); i++) {
      BundleDescription searchedBundle = (BundleDescription) allDependents.get(i);
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
        if (proxy == null)
          continue;
        results = BundleLoader.compoundEnumerations(results, proxy.getBundleLoader().findResources(name));
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

  }

  private void basicAddImmediateDependents(BundleDescription root) {
    BundleDescription[] dependents = root.getDependents();
    for (int i = 0; i < dependents.length; i++) {
      BundleDescription toAdd = dependents[i];
      if (toAdd.getHost() == null && !allDependents.contains(toAdd)) {
        allDependents.add(toAdd);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

  }

  protected synchronized BundleLoaderProxy getLoaderProxy() {
    if (proxy != null)
      return proxy;
    BundleDescription bundleDescription = getBundleDescription();
    if (bundleDescription == null)
      return null;
    proxy = new BundleLoaderProxy(this, bundleDescription);
    bundleDescription.setUserObject(proxy);
    return proxy;
  }
View Full Code Here

Examples of org.eclipse.osgi.service.resolver.BundleDescription

    if (loader != null)
      loader.close();
    proxy.setStale();
    // if proxy is not null then make sure to unset user object
    // associated with the proxy in the state
    BundleDescription description = proxy.getBundleDescription();
    description.setUserObject(null);
  }
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.