public class ManagedServiceFactoryFactoryBean extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, BundleContextAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<Collection>
Factory class that automatically manages instances based on the configuration available inside a
ManagedServiceFactory.
The factory returns a list of ServiceRegistration of all published instances.| Modifier and Type | Field and Description |
|---|---|
Map |
initialInjectionProperties |
| Constructor and Description |
|---|
ManagedServiceFactoryFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
Collection |
getObject() |
Class<Collection> |
getObjectType() |
boolean |
isSingleton() |
void |
setAutowireOnUpdate(boolean autowireOnUpdate)
Sets whether autowire on update should be performed automatically or not.
|
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext)
Set the
BundleContext that this bean runs in. |
void |
setExportContextClassLoader(ExportContextClassLoaderEnum ccl) |
void |
setFactoryPid(String factoryPid) |
void |
setInterfaceDetector(InterfaceDetector detector) |
void |
setInterfaces(Class<?>[] interfaces) |
void |
setListeners(OsgiServiceRegistrationListener[] listeners)
Sets the listeners interested in registration and unregistration events.
|
void |
setServiceProperties(Map serviceProperties)
Sets the properties used when exposing the target as an OSGi service.
|
void |
setTemplateDefinition(org.springframework.beans.factory.config.BeanDefinition[] templateDefinition) |
void |
setUpdateMethod(String updateMethod) |
public Map initialInjectionProperties
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic void setBundleContext(org.osgi.framework.BundleContext bundleContext)
BundleContextAwareBundleContext that this bean runs in. Normally this can
be used to initialize an object.setBundleContext in interface BundleContextAwarebundleContext - the BundleContext object to be used
by this objectpublic Collection getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<Collection>Exceptionpublic Class<Collection> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<Collection>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<Collection>public void setListeners(OsgiServiceRegistrationListener[] listeners)
listeners - registration/unregistration listeners.public void setFactoryPid(String factoryPid)
factoryPid - The factoryPid to set.public void setTemplateDefinition(org.springframework.beans.factory.config.BeanDefinition[] templateDefinition)
templateDefinition - The templateDefinition to set.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setInterfaceDetector(InterfaceDetector detector)
public void setExportContextClassLoader(ExportContextClassLoaderEnum ccl)
ccl - The ccl to set.public void setInterfaces(Class<?>[] interfaces)
interfaces - The interfaces to set.public void setAutowireOnUpdate(boolean autowireOnUpdate)
autowireOnUpdate - public void setUpdateMethod(String updateMethod)
updateMethod - The updateMethod to set.public void setServiceProperties(Map serviceProperties)
ServicePropertiesChangeListener), any updates to the properties will be reflected by the service
registration.serviceProperties - properties used for exporting the target as an OSGi serviceCopyright © 2006–2013. All rights reserved.