diff options
author | gjoranv <gv@verizonmedia.com> | 2019-11-05 10:53:44 +0100 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2019-11-05 10:53:44 +0100 |
commit | d75825d503b8566e66d45b0ef726a1d5834970d7 (patch) | |
tree | d6da7f8af45a6bef83823f1ae7068317a5d17e8d /jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java | |
parent | 73cbfef0434123f59584f9ed5f5cceac6715adbd (diff) |
Reapply "Gjoranv/allow duplicate bundles"
This reverts commit 2ef1e922a1d845b3cd79e9fb329925e7e9896919.
Diffstat (limited to 'jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java')
-rw-r--r-- | jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java b/jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java index f5346a21a4f..b1aceb81bc6 100644 --- a/jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java +++ b/jdisc_core/src/main/java/com/yahoo/jdisc/application/OsgiFramework.java @@ -5,6 +5,7 @@ import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; +import java.util.Collection; import java.util.List; /** @@ -13,6 +14,7 @@ import java.util.List; * {@link BundleInstaller} since that provides common convenience methods. * * @author Simon Thoresen Hult + * @author gjoranv */ public interface OsgiFramework { @@ -58,6 +60,8 @@ public interface OsgiFramework { /** * Synchronously refresh all bundles currently loaded. Once this method returns, the * class loaders of all bundles will reflect on the current set of loaded bundles. + * + * NOTE: This method is no longer used by the Jdisc container framework, but kept for completeness. */ void refreshPackages(); @@ -81,6 +85,20 @@ public interface OsgiFramework { List<Bundle> bundles(); /** + * Returns all installed bundles that are visible to the requesting bundle. Bundle visibility + * is controlled via implementations of {@link org.osgi.framework.hooks.bundle.FindHook}; + */ + List<Bundle> getBundles(Bundle requestingBundle); + + /** + * Allows this framework to install duplicates of the given collection of bundles. Duplicate detection + * is handled by the {@link com.yahoo.jdisc.core.BundleCollisionHook}. + * + * @param bundles The bundles to allow duplicates of + */ + void allowDuplicateBundles(Collection<Bundle> bundles); + + /** * This method starts the framework instance. Before this method is called, any call to {@link * #installBundle(String)} or {@link #bundles()} will generate a {@link NullPointerException}. * |