Package org.apache.cxf.bus.blueprint
Class BlueprintBeanLocator
- java.lang.Object
-
- org.apache.cxf.bus.blueprint.BlueprintBeanLocator
-
- All Implemented Interfaces:
ConfiguredBeanLocator
public class BlueprintBeanLocator extends Object implements ConfiguredBeanLocator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cxf.configuration.ConfiguredBeanLocator
ConfiguredBeanLocator.BeanLoaderListener<T>
-
-
Constructor Summary
Constructors Constructor Description BlueprintBeanLocator(ConfiguredBeanLocator orig, org.osgi.service.blueprint.container.BlueprintContainer cont, org.osgi.framework.BundleContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getBeanNamesOfType(Class<?> type)Gets the names of all the configured beans of the specific type.<T> TgetBeanOfType(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.booleanhasBeanOfName(String name)booleanhasConfiguredPropertyValue(String beanName, String propertyName, String value)For supporting "legacy" config, checks the configured bean to see if it has a property configured with the given name/value.<T> booleanloadBeansOfType(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.
-
-
-
Constructor Detail
-
BlueprintBeanLocator
public BlueprintBeanLocator(ConfiguredBeanLocator orig, org.osgi.service.blueprint.container.BlueprintContainer cont, org.osgi.framework.BundleContext context)
-
-
Method Detail
-
getBeanOfType
public <T> T getBeanOfType(String name, Class<T> type)
Description copied from interface:ConfiguredBeanLocatorGets the bean of the given name and type- Specified by:
getBeanOfTypein interfaceConfiguredBeanLocator- 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:
getBeanNamesOfTypein interfaceConfiguredBeanLocator- 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:
getBeansOfTypein interfaceConfiguredBeanLocator- Returns:
- The collection of all the configured beans of the given type
-
loadBeansOfType
public <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.- Specified by:
loadBeansOfTypein interfaceConfiguredBeanLocator- Returns:
- true if beans of the type were loaded
-
hasConfiguredPropertyValue
public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value)
Description copied from interface:ConfiguredBeanLocatorFor 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:
hasConfiguredPropertyValuein interfaceConfiguredBeanLocator- Returns:
- true if the bean has the given property/value
-
hasBeanOfName
public boolean hasBeanOfName(String name)
- Specified by:
hasBeanOfNamein interfaceConfiguredBeanLocator
-
-