Class ProviderRegistryImpl.BundleResources
- java.lang.Object
-
- org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleResources
-
- Enclosing class:
- ProviderRegistryImpl
private class ProviderRegistryImpl.BundleResources extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private org.osgi.framework.Bundle
bundle
private java.util.List<ProviderRegistryImpl.BundleProviderLoader>
providers
private java.util.List<ProviderRegistryImpl.BundleProviderLoader>
serviceProviders
-
Constructor Summary
Constructors Constructor Description BundleResources(org.osgi.framework.Bundle b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.private void
locateProviders()
private void
locateServices()
boolean
needsTracking()
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.private java.util.List<ProviderRegistryImpl.BundleProviderLoader>
processDefinitions(java.lang.String path)
Process all of the service definition files in a given target path.void
remove()
Remove all resources associated with this bundle from the global registry.
-
-
-
Field Detail
-
bundle
private org.osgi.framework.Bundle bundle
-
serviceProviders
private java.util.List<ProviderRegistryImpl.BundleProviderLoader> serviceProviders
-
providers
private java.util.List<ProviderRegistryImpl.BundleProviderLoader> providers
-
-
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
-
-