Class ProviderRegistryImpl.BundleResources

  • Enclosing class:
    ProviderRegistryImpl

    private class ProviderRegistryImpl.BundleResources
    extends java.lang.Object
    • Constructor Detail

      • BundleResources

        public BundleResources​(org.osgi.framework.Bundle b)
    • Method Detail

      • needsTracking

        public boolean needsTracking()
      • locateProviders

        private void locateProviders()
      • locateHeaderProviderDefinitions

        private java.util.List<ProviderRegistryImpl.BundleProviderLoader> locateHeaderProviderDefinitions()
        Parse the Export-Provider: header to create a list of providers that are exported via the header syntax rather than via a provider mapping file.
        Returns:
        A list of providers defined on the header, or null if no providers were exported.
      • locateServices

        private void locateServices()
      • remove

        public void remove()
        Remove all resources associated with this bundle from the global registry.
      • processDefinitions

        private java.util.List<ProviderRegistryImpl.BundleProviderLoader> processDefinitions​(java.lang.String path)
        Process all of the service definition files in a given target path. This is used to process both the META-INF/services files and the OSGI-INF/providers files.
        Parameters:
        path - The target path location.
        Returns:
        The list of matching service definitions. Returns null if no matches were found.
      • parseServiceFile

        private void parseServiceFile​(java.net.URL u,
                                      java.util.List<ProviderRegistryImpl.BundleProviderLoader> mappings)
        Parse a provider definition file and create loaders for all definitions contained within the file.
        Parameters:
        u - The URL of the file