Definition at line 48 of file Packages.java.
Package Functions | |
Packages (Framework fw) | |
Construct Packages object. | |
synchronized void | registerPackages (Iterator exports, Iterator imports) |
Register all packages a bundle needs to export and import. | |
synchronized ExportPkg | registerDynamicImport (ImportPkg ip) |
Dynamically check and register a dynamic package import. | |
synchronized boolean | unregisterPackages (List exports, List imports, boolean force) |
Unregister bundle packages in framework. | |
synchronized String | resolve (BundleImpl bundle, Iterator pkgs) |
Try to resolve all packages for a bundle. | |
Pkg | getPkg (String pkg) |
Get Pkg object for named package. | |
synchronized Collection | getZombieAffected (Bundle[] bundles) |
Get bundles affected by zombie packages. | |
Package Attributes | |
final Framework | framework |
Framework for bundle. |
synchronized void org.knopflerfish.framework.Packages.registerPackages | ( | Iterator | exports, | |
Iterator | imports | |||
) | [package] |
Register all packages a bundle needs to export and import.
If it is registered by the system bundle, export it immediately.
exports | Exported packages. | |
imports | Imported packages. |
Definition at line 105 of file Packages.java.
References org.knopflerfish.framework.Pkg.addExporter(), org.knopflerfish.framework.Pkg.addImporter(), org.knopflerfish.framework.ImportPkg.name, and org.knopflerfish.framework.ExportPkg.name.
Referenced by org.knopflerfish.framework.BundlePackages.attachFragment(), and org.knopflerfish.framework.BundlePackages.registerPackages().
synchronized ExportPkg org.knopflerfish.framework.Packages.registerDynamicImport | ( | ImportPkg | ip | ) | [package] |
Dynamically check and register a dynamic package import.
pe | ImportPkg import to add. |
Definition at line 139 of file Packages.java.
References org.knopflerfish.framework.Pkg.addImporter(), org.knopflerfish.framework.ImportPkg.bpkgs, org.knopflerfish.framework.BundlePackages.bundle, org.knopflerfish.framework.ImportPkg.name, org.knopflerfish.framework.ImportPkg.provider, and org.knopflerfish.framework.Pkg.removeImporter().
Referenced by org.knopflerfish.framework.BundlePackages.getDynamicProviderBundlePackages().
synchronized boolean org.knopflerfish.framework.Packages.unregisterPackages | ( | List | exports, | |
List | imports, | |||
boolean | force | |||
) | [package] |
Unregister bundle packages in framework.
If we find exported packages that has been selected as providers don't unregister them unless the parameter force is true. If not all exporters were removed, the don't remove any importers
exports | Exported packages. | |
imports | Imported packages. | |
force | If true force unregistration of package providers. |
Definition at line 188 of file Packages.java.
References org.knopflerfish.framework.ImportPkg.bpkgs, org.knopflerfish.framework.ExportPkg.bpkgs, org.knopflerfish.framework.Pkg.importers, org.knopflerfish.framework.Pkg.isEmpty(), org.knopflerfish.framework.ImportPkg.name, org.knopflerfish.framework.ExportPkg.name, org.knopflerfish.framework.ImportPkg.pkg, org.knopflerfish.framework.ExportPkg.pkg, org.knopflerfish.framework.ImportPkg.pkgString(), org.knopflerfish.framework.ImportPkg.provider, org.knopflerfish.framework.Pkg.providers, org.knopflerfish.framework.Pkg.removeExporter(), and org.knopflerfish.framework.Pkg.removeImporter().
Referenced by org.knopflerfish.framework.BundlePackages.unregisterPackages().
synchronized String org.knopflerfish.framework.Packages.resolve | ( | BundleImpl | bundle, | |
Iterator | pkgs | |||
) | [package] |
Try to resolve all packages for a bundle.
bundle | Bundle owning packages. | |
pkgs | List of packages to be resolved. |
Definition at line 244 of file Packages.java.
References org.knopflerfish.framework.Packages.framework, org.knopflerfish.framework.Listeners.frameworkError(), and org.knopflerfish.framework.Framework.listeners.
Referenced by org.knopflerfish.framework.BundlePackages.resolvePackages().
Pkg org.knopflerfish.framework.Packages.getPkg | ( | String | pkg | ) | [package] |
Get Pkg object for named package.
pkg | Package name. |
Definition at line 306 of file Packages.java.
Referenced by org.knopflerfish.framework.PackageAdminImpl.getExportedPackage(), org.knopflerfish.framework.PackageAdminImpl.getExportedPackages(), and org.knopflerfish.framework.ServiceReferenceImpl.isAssignableTo().
synchronized Collection org.knopflerfish.framework.Packages.getZombieAffected | ( | Bundle[] | bundles | ) | [package] |
Get bundles affected by zombie packages.
Compute a graph of bundles starting with the specified bundles. If no bundles are specified, compute a graph of bundles starting with all exporting a zombie package. Any bundle that imports a package that is currently exported by a bundle in the graph is added to the graph. The graph is fully constructed when there is no bundle outside the graph that imports a package from a bundle in the graph. The graph may contain UNINSTALLED
bundles that are currently still exporting packages.
bundles | Initial bundle set. |
Definition at line 326 of file Packages.java.
References org.knopflerfish.framework.ExportPkg.bpkgs, org.knopflerfish.framework.BundlePackages.bundle, org.knopflerfish.framework.BundleImpl.getBundleId(), org.knopflerfish.framework.BundleImpl.getExports(), org.knopflerfish.framework.BundleImpl.getFragmentHost(), org.knopflerfish.framework.ExportPkg.getPackageImporters(), org.knopflerfish.framework.BundleImpl.getStartLevel(), org.knopflerfish.framework.BundleImpl.isAttached(), org.knopflerfish.framework.BundleImpl.isFragment(), org.knopflerfish.framework.ExportPkg.pkg, org.knopflerfish.framework.Pkg.providers, and org.knopflerfish.framework.ExportPkg.zombie.