Class Solstice

java.lang.Object
dev.equo.solstice.Solstice

public class Solstice extends Object
Represents a closed universe of OSGi bundles.
  • Method Details

    • findBundlesOnClasspath

      public static Solstice findBundlesOnClasspath()
      Creates a Solstice instance by finding all available bundles on the classpath.
    • bundlesOnClasspathOutOf

      public List<String> bundlesOnClasspathOutOf(Collection<String> symbolicNames)
    • bySymbolicName

      public Map<String,List<SolsticeManifest>> bySymbolicName()
    • byExportedPackage

      public Map<String,List<SolsticeManifest>> byExportedPackage()
    • calculateMissingBundles

      public Map<String,List<SolsticeManifest>> calculateMissingBundles(Set<String> available)
    • calculateMissingPackages

      public Map<String,List<SolsticeManifest>> calculateMissingPackages(Set<String> available)
    • warnAndModifyManifestsToFix

      public void warnAndModifyManifestsToFix()
      Sends warnings to logger, then modifies every manifest to resolve all these warnings.
      • multiple bundles with same symbolic name (resolved by first one on the classpath, since that's what Class.forName will do)
      • multiple bundles which export the same package (resolved by first one on the classpath, since that's what Class.forName will do)
      • required bundle which is not present (resolved by removing requirement from the SolsticeManifest)
      • imported package which is not present (resolved by removing import from the SolsticeManifest)
    • warnAndModifyManifestsToFix

      public void warnAndModifyManifestsToFix(org.slf4j.Logger logger)
    • openAtomos

      public void openAtomos(Map<String,String> props) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • openShim

      public void openShim(Map<String,String> props)
    • getContext

      public org.osgi.framework.BundleContext getContext()
    • startAllWithLazy

      public void startAllWithLazy(boolean lazyValue)
      Starts all hydrated manfiests.
    • start

      public void start(String symbolicName)
      Starts all bundles with the given symbolic name, and all of their transitive dependencies as well.
    • startWithoutTransitives

      public void startWithoutTransitives(String symbolicName)
      Starts all bundles with the given symbolic name, without starting their transitive dependencies.