Package org.eclipse.osgi.internal.loader

Examples of org.eclipse.osgi.internal.loader.BundleLoaderProxy


    //Filter the dependents;
    if (allDependents == null)
      return;

    for (Iterator iter = allDependents.iterator(); iter.hasNext();) {
      BundleLoaderProxy proxy = buddyRequester.getLoaderProxy((BundleDescription) iter.next());
      if (proxy == null)
        iter.remove();

      try {
        String[] allContributions = ManifestElement.getArrayFromList((String) ((AbstractBundle) proxy.getBundle()).getBundleData().getManifest().get(Constants.REGISTERED_POLICY));
        if (allContributions == null) {
          iter.remove();
          continue;
        }
        boolean contributes = false;
View Full Code Here


    Class result = null;
    int size = allDependents.size();
    for (int i = 0; i < size && result == null; i++) {
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy((BundleDescription) allDependents.get(i));
        if (proxy == null)
          continue;
        result = proxy.getBundleLoader().findClass(name);
      } catch (ClassNotFoundException e) {
        //Nothing to do, just keep looking
        continue;
      }
    }
View Full Code Here

      return null;

    URL result = null;
    int size = allDependents.size();
    for (int i = 0; i < size && result == null; i++) {
      BundleLoaderProxy proxy = buddyRequester.getLoaderProxy((BundleDescription) allDependents.get(i));
      if (proxy == null)
        continue;
      result = proxy.getBundleLoader().findResource(name);
    }
    return result;
  }
View Full Code Here

    Enumeration results = null;
    int size = allDependents.size();
    for (int i = 0; i < size; i++) {
      try {
        BundleLoaderProxy proxy = buddyRequester.getLoaderProxy((BundleDescription) allDependents.get(i));
        if (proxy == null)
          continue;
        results = BundleLoader.compoundEnumerations(results, proxy.getBundleLoader().findResources(name));
      } catch (IOException e) {
        //Ignore and keep looking
      }
    }
    return results;
View Full Code Here

    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);
      } catch (ClassNotFoundException e) {
        if (result == null)
          addDependent(i, searchedBundle);
      }
    }
View Full Code Here

    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) {
        addDependent(i, searchedBundle);
      }
    }
    return result;
View Full Code Here

    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));
        addDependent(i, searchedBundle);
      } catch (IOException e) {
        //Ignore and keep looking
      }
    }
View Full Code Here

    stopChildFramework();
    super.uninstall();
  }

  private void checkClassLoader() {
    BundleLoaderProxy proxy = getLoaderProxy();
    if (proxy != null && proxy.inUse() && proxy.getBundleLoader() != null) {
      BundleClassLoader loader = proxy.getBundleLoader().createClassLoader();
      loader.getResource("dummy"); //$NON-NLS-1$
    }
  }
View Full Code Here

  private ExportedPackageImpl createExportedPackage(ExportPackageDescription description) {
    BundleDescription exporter = description.getExporter();
    if (exporter == null || exporter.getHost() != null)
      return null;
    BundleLoaderProxy proxy = (BundleLoaderProxy) exporter.getUserObject();
    if (proxy == null) {
      BundleHost bundle = (BundleHost) framework.getBundle(exporter.getBundleId());
      if (bundle == null)
        return null;
      proxy = bundle.getLoaderProxy();
View Full Code Here

              ((BundleData) iRemovals.next()).close();
            } catch (IOException e) {
              // ignore
            }
      }
      BundleLoaderProxy proxy = (BundleLoaderProxy) bundle.getUserObject();
      if (proxy != null) {
        BundleLoader.closeBundleLoader(proxy);
        try {
          proxy.getBundleHost().getBundleData().close();
        } catch (IOException e) {
          // ignore
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.internal.loader.BundleLoaderProxy

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.