Package org.eclipse.osgi.service.resolver

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


    {
        int size = Platform.getPlatformAdmin().getState().getBundles().length;
        Bundle[] bundles = new Bundle[size];
        for( int i=0; i<size; i++)
        {
            BundleDescription bd = Platform.getPlatformAdmin().getState().getBundles()[i];
            bundles[i] = new Bundle(bd.getSymbolicName(),bd.getSymbolicName(), bd.getSupplier().getName(), bd.getVersion().toString(), null);
            BundleSpecification[] bs = bd.getRequiredBundles();
            List requiredBundles = new ArrayList();
            for( int j=0; j<bs.length; j++)
            {
                requiredBundles.add(getBundleDescription(bs[j]));
            }
View Full Code Here


  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

  }

  public synchronized BundleLoaderProxy getLoaderProxy() {
    if (proxy != null)
      return proxy;
    BundleDescription bundleDescription = getBundleDescription();
    if (bundleDescription == null)
      return null;
    proxy = new BundleLoaderProxy(this, bundleDescription);
    // Note that BundleLoaderProxy is a BundleReference
    // this is necessary to ensure the resolver can continue
    // to provide BundleRevision objects to resolver hooks.
    bundleDescription.setUserObject(proxy);
    return proxy;
  }
View Full Code Here

    if (end - start <= 1)
      return;
    List<BundleDescription> descList = new ArrayList<BundleDescription>(end - start);
    List<AbstractBundle> missingDescs = new ArrayList<AbstractBundle>(0);
    for (int i = start; i < end; i++) {
      BundleDescription desc = bundles[i].getBundleDescription();
      if (desc != null)
        descList.add(desc);
      else
        missingDescs.add(bundles[i]);
    }
View Full Code Here

  }

  public 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

  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

      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);
View Full Code Here

      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);
      if (result == null) {
View Full Code Here

      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

  }

  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

TOP

Related Classes of org.eclipse.osgi.service.resolver.BundleDescription

Copyright © 2018 www.massapicom. 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.