org.springframework.osgi.extensions.annotation
Class ServiceReferenceInjectionBeanPostProcessor
java.lang.Object
org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
org.springframework.osgi.extensions.annotation.ServiceReferenceInjectionBeanPostProcessor
- All Implemented Interfaces:
- BeanClassLoaderAware, BeanFactoryAware, BeanPostProcessor, InstantiationAwareBeanPostProcessor, SmartInstantiationAwareBeanPostProcessor, BundleContextAware
public class ServiceReferenceInjectionBeanPostProcessor
- extends InstantiationAwareBeanPostProcessorAdapter
- implements BundleContextAware, BeanFactoryAware, BeanClassLoaderAware
BeanPostProcessor
that processed annotation to inject
Spring-DM managed OSGi services.
- Author:
- Andy Piper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceReferenceInjectionBeanPostProcessor
public ServiceReferenceInjectionBeanPostProcessor()
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interface BeanClassLoaderAware
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws BeansException
- process FactoryBean created objects, since these will not have had
services injected.
- Specified by:
postProcessAfterInitialization
in interface BeanPostProcessor
- Overrides:
postProcessAfterInitialization
in class InstantiationAwareBeanPostProcessorAdapter
- Parameters:
bean
- beanName
-
- Throws:
BeansException
postProcessPropertyValues
public PropertyValues postProcessPropertyValues(PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
throws BeansException
- Specified by:
postProcessPropertyValues
in interface InstantiationAwareBeanPostProcessor
- Overrides:
postProcessPropertyValues
in class InstantiationAwareBeanPostProcessorAdapter
- Throws:
BeansException
hasServiceProperty
protected ServiceReference hasServiceProperty(PropertyDescriptor propertyDescriptor)
setBundleContext
public void setBundleContext(BundleContext context)
- Description copied from interface:
BundleContextAware
- Set the
BundleContext
that this bean runs in. Normally this can
be used to initialize an object.
- Specified by:
setBundleContext
in interface BundleContextAware
- Parameters:
context
- the BundleContext
object to be used
by this object
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Throws:
BeansException
Copyright © 2006-2009 Spring Framework. All Rights Reserved.