Examples of BundleDescription


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 = allDependents.get(i);
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
        if (proxy == null)
          continue;
        result = proxy.getBundleLoader().findClass(name);
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 = allDependents.get(i);
      BundleLoaderProxy proxy = buddyRequester.getLoaderProxy(searchedBundle);
      if (proxy == null)
        continue;
      result = proxy.getBundleLoader().findResource(name);
      if (result == null) {
View Full Code Here

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

      return null;

    Enumeration<URL> results = null;
    //size may change, so we must check it every time
    for (int i = 0; i < allDependents.size(); i++) {
      BundleDescription searchedBundle = 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

   * @return BundleContext for this bundle.
   */
  abstract protected BundleContextImpl getContext();

  public BundleException getResolutionFailureException() {
    BundleDescription bundleDescription = getBundleDescription();
    if (bundleDescription == null)
      return new BundleException(NLS.bind(Msg.BUNDLE_UNRESOLVED_EXCEPTION, this.toString()), BundleException.RESOLVE_ERROR);
    // just a sanity check - this would be an inconsistency between the framework and the state
    if (bundleDescription.isResolved())
      return new BundleException(Msg.BUNDLE_UNRESOLVED_STATE_CONFLICT, BundleException.RESOLVE_ERROR);
    return getResolverError(bundleDescription);
  }
View Full Code Here

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

    return adapt0(adapterType);
  }

  public List<BundleRevision> getRevisions() {
    List<BundleRevision> revisions = new ArrayList<BundleRevision>();
    BundleDescription current = getBundleDescription();
    if (current != null)
      revisions.add(current);
    BundleDescription[] removals = framework.adaptor.getState().getRemovalPending();
    for (BundleDescription removed : removals) {
      if (removed.getBundleId() == getBundleId() && removed != current) {
View Full Code Here

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

      }
    }
    if (BundleWiring.class.equals(adapterType)) {
      if (state == UNINSTALLED)
        return null;
      BundleDescription description = getBundleDescription();
      return (A) description.getWiring();
    }

    if (BundleRevision.class.equals(adapterType)) {
      if (state == UNINSTALLED)
        return null;
View Full Code Here

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

    State state = platformAdmin.getState(false /*mutable*/);
    if (state == null) {
      System.err.println("Resolver state is null");
      return errors;
    }
    BundleDescription description = state.getBundle(bundle.getBundleId());
    if (description == null) {
      System.err.println("Could not determine BundleDescription for " + bundle.toString());
    }
    getRelevantErrors(state, errors, description);
    return errors;
View Full Code Here

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

            return javaClassPath;
        }
        List<String> pdeClassPath = new ArrayList<String>();
        pdeClassPath.addAll(Arrays.asList(javaClassPath));

        BundleDescription target = model.getBundleDescription();

        Set<BundleDescription> bundles = new HashSet<BundleDescription>();
        // target is null if plugin uses non OSGI format
        if (target != null) {
            addDependentBundles(target, bundles);
View Full Code Here

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

                    getLogger().error(e.getMessage(), e);
                }
            }

            stateController.resolveState();
            BundleDescription b = stateController.getBundleDescription(proj);
            if (b != null) {
                try {
                    stateController.assertResolved(b);
                    getLogger().info("OSGi bundle is resolved: " + b.getSymbolicName());
                } catch (BundleException e) {
                    stateController.analyzeErrors(b);
                    if(getLogger().isDebugEnabled()) {
                        getLogger().debug(stateController.reportErrors(b));
                    }
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.