Apache CXF API

org.apache.cxf.bus.spring
Class SpringBeanLocator

java.lang.Object
  extended by org.apache.cxf.bus.spring.SpringBeanLocator
All Implemented Interfaces:
ConfiguredBeanLocator

public class SpringBeanLocator
extends Object
implements ConfiguredBeanLocator


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.cxf.configuration.ConfiguredBeanLocator
ConfiguredBeanLocator.BeanLoaderListener<T>
 
Constructor Summary
SpringBeanLocator(org.springframework.context.ApplicationContext ctx)
           
SpringBeanLocator(org.springframework.context.ApplicationContext ctx, Bus bus)
           
 
Method Summary
 List<String> getBeanNamesOfType(Class<?> type)
          Gets the names of all the configured beans of the specific type.
<T> T
getBeanOfType(String name, Class<T> type)
          Gets the bean of the given name and type
<T> Collection<? extends T>
getBeansOfType(Class<T> type)
          Gets all the configured beans of the specific types.
<T> List<T>
getOSGiServices(Class<T> type)
           
 boolean hasBeanOfName(String name)
           
 boolean hasConfiguredPropertyValue(String beanName, String propertyName, String searchValue)
          For supporting "legacy" config, checks the configured bean to see if it has a property configured with the given name/value.
<T> boolean
loadBeansOfType(Class<T> type, ConfiguredBeanLocator.BeanLoaderListener<T> listener)
          Iterates through the beans of the given type, calling the listener to determine if it should be loaded or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringBeanLocator

public SpringBeanLocator(org.springframework.context.ApplicationContext ctx)

SpringBeanLocator

public SpringBeanLocator(org.springframework.context.ApplicationContext ctx,
                         Bus bus)
Method Detail

getBeanOfType

public <T> T getBeanOfType(String name,
                           Class<T> type)
Description copied from interface: ConfiguredBeanLocator
Gets the bean of the given name and type

Specified by:
getBeanOfType in interface ConfiguredBeanLocator
Returns:
the bean

getBeanNamesOfType

public List<String> getBeanNamesOfType(Class<?> type)
Gets the names of all the configured beans of the specific type. Does not cause them to be loaded.

Specified by:
getBeanNamesOfType in interface ConfiguredBeanLocator
Returns:
List of all the bean names for the given type

getBeansOfType

public <T> Collection<? extends T> getBeansOfType(Class<T> type)
Gets all the configured beans of the specific types. Causes them all to be loaded.

Specified by:
getBeansOfType in interface ConfiguredBeanLocator
Returns:
The collection of all the configured beans of the given type

loadBeansOfType

public <T> boolean loadBeansOfType(Class<T> type,
                                   ConfiguredBeanLocator.BeanLoaderListener<T> listener)
Description copied from interface: ConfiguredBeanLocator
Iterates through the beans of the given type, calling the listener to determine if it should be loaded or not.

Specified by:
loadBeansOfType in interface ConfiguredBeanLocator
Returns:
true if beans of the type were loaded

hasConfiguredPropertyValue

public boolean hasConfiguredPropertyValue(String beanName,
                                          String propertyName,
                                          String searchValue)
Description copied from interface: ConfiguredBeanLocator
For supporting "legacy" config, checks the configured bean to see if it has a property configured with the given name/value. Mostly used for supporting things configured with "activationNamespaces" set.

Specified by:
hasConfiguredPropertyValue in interface ConfiguredBeanLocator
Returns:
true if the bean has the given property/value

getOSGiServices

public <T> List<T> getOSGiServices(Class<T> type)

hasBeanOfName

public boolean hasBeanOfName(String name)
Specified by:
hasBeanOfName in interface ConfiguredBeanLocator

Apache CXF API

Apache CXF