Package com.yahoo.container.di
Interface Osgi
- All Known Subinterfaces:
OsgiWrapper
- All Known Implementing Classes:
MockOsgiWrapper
public interface Osgi
This interface has default implementations of all methods, to allow using it
for testing, instead of mocking or a test implementation.
TODO: remove test code from this interface.
- Author:
- gjoranv, Tony Vaagenes, ollivir
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault Set<org.osgi.framework.Bundle>
If the current generation is a success, the set of bundles that is not needed by the new application generation, and therefore should be scheduled for uninstalling, is returned.default org.osgi.framework.Bundle
getBundle
(com.yahoo.component.ComponentSpecification spec) default void
installPlatformBundles
(Collection<String> bundlePaths) default Class<?>
default void
useApplicationBundles
(Collection<com.yahoo.config.FileReference> bundles, long generation) Installs the new set of application bundles.
-
Method Details
-
installPlatformBundles
-
useApplicationBundles
default void useApplicationBundles(Collection<com.yahoo.config.FileReference> bundles, long generation) Installs the new set of application bundles.- Parameters:
bundles
- The bundles for the new application.generation
- The generation number of the new application.
-
completeBundleGeneration
If the current generation is a success, the set of bundles that is not needed by the new application generation, and therefore should be scheduled for uninstalling, is returned. If the current generation is a failure, all state related to application bundles is reverted to the previous generation. The set of bundles that was exclusively needed by the new generation, and therefore should be scheduled for uninstalling, is returned.- Parameters:
status
- The success or failure of the new generation- Returns:
- The set of bundles that are no longer needed by the new or latest good generation.
-
resolveClass
-
getBundle
default org.osgi.framework.Bundle getBundle(com.yahoo.component.ComponentSpecification spec)
-