public class OsgiServiceRegistry extends Object
Constructor and Description |
---|
OsgiServiceRegistry()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Set<OsgiService> |
getServices(ComponentContainer componentContainer)
Returns the services defined by the previously registered interfaces and factories.
|
void |
registerService(Class<?> serviceInterface)
Registers the intent to publish an implementation of the given interface, if one exists.
|
<T> void |
registerServiceFactory(Class<? super T> serviceInterface,
Class<? extends <any>> osgiFactoryClass)
Registers the intent to publish the given service as one that comes from an OSGi
ServiceFactory rather than being a singleton instance. |
public void registerService(Class<?> serviceInterface)
serviceInterface
- the type of service to publishpublic <T> void registerServiceFactory(Class<? super T> serviceInterface, Class<? extends <any>> osgiFactoryClass)
ServiceFactory
rather than being a singleton instance.T
- the service typeserviceInterface
- the interface of the serviceosgiFactoryClass
- the type of factory that creates instances of the service@Nonnull public Set<OsgiService> getServices(ComponentContainer componentContainer)
componentContainer
- contains any singleton instances of the registered servicesCopyright © 2002-2019 Atlassian. All Rights Reserved.