org.springframework.osgi.service.exporter.support
Class BeanNameServicePropertiesResolver

java.lang.Object
  extended by org.springframework.osgi.service.exporter.support.BeanNameServicePropertiesResolver
All Implemented Interfaces:
InitializingBean, BundleContextAware, OsgiServicePropertiesResolver

public class BeanNameServicePropertiesResolver
extends Object
implements OsgiServicePropertiesResolver, BundleContextAware, InitializingBean

OsgiServicePropertiesResolver that creates a service property set with the following properties:

If the name is null/empty, the keys that refer to it will not be created.

Author:
Adrian Colyer, Hal Hildebrand
See Also:
OsgiServicePropertiesResolver, OsgiServiceFactoryBean

Field Summary
 
Fields inherited from interface org.springframework.osgi.service.exporter.OsgiServicePropertiesResolver
BEAN_NAME_PROPERTY_KEY, BLUEPRINT_COMP_NAME
 
Constructor Summary
BeanNameServicePropertiesResolver()
           
 
Method Summary
 void afterPropertiesSet()
           
 Map getServiceProperties(String beanName)
          Returns a map containing the service properties associated with the given Spring managed bean identified by its name.
 void setBundleContext(BundleContext context)
          Set the BundleContext that this bean runs in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanNameServicePropertiesResolver

public BeanNameServicePropertiesResolver()
Method Detail

getServiceProperties

public Map getServiceProperties(String beanName)
Description copied from interface: OsgiServicePropertiesResolver
Returns a map containing the service properties associated with the given Spring managed bean identified by its name. The name can be null (for example if nested beans are exported).

Specified by:
getServiceProperties in interface OsgiServicePropertiesResolver
Parameters:
beanName - Spring managed bean name
Returns:
map containing the service properties

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

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2006-2011 Spring Framework. All Rights Reserved.