public class ScrManagedServiceServiceFactory extends java.lang.Object implements org.osgi.framework.ServiceFactory<ScrManagedService>
ScrManagedServiceServiceFactory
is the ServiceFactory
registered on behalf of the ScrManagedService
(or
ScrManagedServiceMetaTypeProvider
, resp.) to create the instance on
demand once it is used by the Configuration Admin Service or the MetaType
Service.
In contrast to the ScrManagedService
and
ScrManagedServiceMetaTypeProvider
classes, this class only requires
core OSGi API and thus may be instantiated without the Configuration Admin
and/or MetaType Service API actually available at the time of instantiation.
Modifier and Type | Field and Description |
---|---|
private SimpleLogger |
logger |
private ScrConfigurationImpl |
scrConfiguration |
Constructor and Description |
---|
ScrManagedServiceServiceFactory(ScrConfigurationImpl scrConfiguration,
SimpleLogger logger) |
Modifier and Type | Method and Description |
---|---|
ScrManagedService |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<ScrManagedService> registration) |
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration<ScrManagedService> registration,
ScrManagedService service) |
private final ScrConfigurationImpl scrConfiguration
private final SimpleLogger logger
public ScrManagedServiceServiceFactory(ScrConfigurationImpl scrConfiguration, SimpleLogger logger)
public ScrManagedService getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<ScrManagedService> registration)
getService
in interface org.osgi.framework.ServiceFactory<ScrManagedService>
public void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<ScrManagedService> registration, ScrManagedService service)
ungetService
in interface org.osgi.framework.ServiceFactory<ScrManagedService>