|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.osgi.registry.ProviderRegistryImpl
public class ProviderRegistryImpl
The implementation of the provider registry used to store the bundle registrations.
Field Summary | |
---|---|
static String |
EXPORT_PROVIDER_HEADER
|
static String |
OPT_IN_HEADER
|
Constructor Summary | |
---|---|
ProviderRegistryImpl(Activator activator)
|
Method Summary | |
---|---|
Object |
addBundle(org.osgi.framework.Bundle bundle)
Add a bundle to the provider registry. |
Object |
getService(String providerId)
Locate and instantiate an instance of a service provider defined in the META-INF/services directory of tracked bundles. |
Class<?> |
getServiceClass(String providerId)
Locate and return the class for a service provider defined in the META-INF/services directory of tracked bundles. |
List<Class<?>> |
getServiceClasses(String providerId)
Locate all services that match a given provider id and return the implementation classes |
List<Object> |
getServices(String providerId)
Locate all services that match a given provider id and create instances. |
Class<?> |
locate(String providerId)
Locate a class by its provider id indicator. . |
List<Class<?>> |
locateAll(String providerId)
Locate all class files that match a given provider id. |
protected void |
registerProvider(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
Register an individual provivider item by its provider identifier. |
protected void |
registerService(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
Register an individual provivider item by its provider identifier. |
void |
removeBundle(org.osgi.framework.Bundle bundle,
Object obj)
Remove a bundle from the registry. |
protected void |
unregisterProvider(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
Removed a provider registration for a named provider id. |
protected void |
unregisterService(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
Removed a provider registration for a named provider id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String OPT_IN_HEADER
public static final String EXPORT_PROVIDER_HEADER
Constructor Detail |
---|
public ProviderRegistryImpl(Activator activator)
Method Detail |
---|
public Object addBundle(org.osgi.framework.Bundle bundle)
bundle
- The source bundle.
public void removeBundle(org.osgi.framework.Bundle bundle, Object obj)
bundle
- The target bundle.protected void registerProvider(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
id
- The provider id.provider
- The loader used to resolve the provider class.protected void unregisterProvider(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
id
- The target idprovider
- The provider registration instanceprotected void registerService(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
id
- The provider id.provider
- The loader used to resolve the provider class.protected void unregisterService(org.apache.geronimo.osgi.registry.ProviderRegistryImpl.BundleProviderLoader provider)
id
- The target idprovider
- The provider registration instancepublic Class<?> locate(String providerId)
locate
in interface ProviderRegistry
providerId
- The provider id (generally, a fully qualified class name).
public List<Class<?>> locateAll(String providerId)
locateAll
in interface ProviderRegistry
providerId
- The target provider identifier.
public Object getService(String providerId) throws Exception
getService
in interface ProviderRegistry
providerId
- The name of the target interface class.
Exception
- Any classloading or other exceptions thrown during
the process of creating this service instance.public List<Object> getServices(String providerId)
getServices
in interface ProviderRegistry
providerId
- The target provider identifier.
public List<Class<?>> getServiceClasses(String providerId)
getServiceClasses
in interface ProviderRegistry
providerId
- The target provider identifier.
public Class<?> getServiceClass(String providerId) throws ClassNotFoundException
getServiceClass
in interface ProviderRegistry
providerId
- The name of the target interface class.
Exception
- Any classloading or other exceptions thrown during
the process of loading this service provider class.
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |