diff options
author | gjoranv <gv@verizonmedia.com> | 2023-01-03 14:49:54 +0100 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2023-01-09 00:17:35 +0100 |
commit | a036ba2190b4676cf394e72dbed77a26c3a94eb3 (patch) | |
tree | 6a94ecaa13d44f84bf57d08fdc93255b25796216 /container-core/src/main/java/com/yahoo/container | |
parent | 43b7c21677e9ca8a195c1dcc91d7b4f795ac02a4 (diff) |
Add method for listing bsnVersion for active application bundles.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java index cf3db91239a..0717ca51dc5 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java @@ -3,6 +3,7 @@ package com.yahoo.container.core.config; import com.yahoo.config.FileReference; import com.yahoo.container.di.Osgi.GenerationStatus; +import com.yahoo.jdisc.core.BsnVersion; import com.yahoo.osgi.Osgi; import org.osgi.framework.Bundle; @@ -14,6 +15,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Logger; +import java.util.stream.Collectors; /** * Manages the set of installed and active/inactive bundles. @@ -49,6 +51,14 @@ public class ApplicationBundleLoader { } /** + * Returns bsn:version for all active bundles. + */ + public synchronized List<BsnVersion> activeBundlesBsnVersion() { + return activeBundles.values().stream().map(BsnVersion::new) + .collect(Collectors.toList()); + } + + /** * Installs the given set of bundles and updates state for which bundles and file references * that are active or should be uninstalled in case of success or failure. */ |