Class DefaultOSGiConfigurator

  • All Implemented Interfaces:
    OSGiConfigurator

    public class DefaultOSGiConfigurator
    extends java.lang.Object
    implements OSGiConfigurator
    Configurator implementation that loads bundles listed in a text manifest file that is generated by Tycho. If Tycho is in "bootstrapped" mode, then it instead loads bundles contained withing the "tycho-bundles-external" bootstrap zip-ball.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL  
      private static org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL_ZIP  
      private org.slf4j.Logger logger  
      private org.fedoraproject.xmvn.resolver.Resolver resolver  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultOSGiConfigurator​(org.fedoraproject.xmvn.resolver.Resolver resolver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<java.nio.file.Path> getBundles()  
      private java.util.List<java.lang.String> getBundlesFromZip​(java.nio.file.Path bundlesZip)
      Extracts all OSGi bundles contained within the given zip file and returns them in a list.
      java.util.Collection<java.lang.String> getExportedPackages()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private final org.slf4j.Logger logger
      • BUNDLES_EXTERNAL

        private static final org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL
      • BUNDLES_EXTERNAL_ZIP

        private static final org.fedoraproject.xmvn.artifact.Artifact BUNDLES_EXTERNAL_ZIP
      • resolver

        private final org.fedoraproject.xmvn.resolver.Resolver resolver
    • Constructor Detail

      • DefaultOSGiConfigurator

        public DefaultOSGiConfigurator​(org.fedoraproject.xmvn.resolver.Resolver resolver)
    • Method Detail

      • getBundles

        public java.util.Collection<java.nio.file.Path> getBundles()
        Specified by:
        getBundles in interface OSGiConfigurator
      • getBundlesFromZip

        private java.util.List<java.lang.String> getBundlesFromZip​(java.nio.file.Path bundlesZip)
                                                            throws java.io.IOException
        Extracts all OSGi bundles contained within the given zip file and returns them in a list.
        Parameters:
        bundlesZip - path to the zip on the filesystem
        Returns:
        the list of paths to the extracted bundles
        Throws:
        java.io.IOException - if there was an IO error during extraction