aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/core
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2023-01-03 14:49:54 +0100
committergjoranv <gv@verizonmedia.com>2023-01-09 12:59:59 +0100
commitbe55b80e2c1af8ce7e1d640c7de6cb642281fb9a (patch)
treef5c4ce59f779ff6f1e51762f0a22290a7dc6e367 /container-core/src/main/java/com/yahoo/container/core
parented9092b7fd04633a4d0f92c6901facf75fbceb79 (diff)
Add method for listing bsnVersion for active application bundles.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java10
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.
*/