Package org.apache.cxf.bus.osgi
Class OSGiBeanLocator
java.lang.Object
org.apache.cxf.bus.osgi.OSGiBeanLocator
- All Implemented Interfaces:
ConfiguredBeanLocator
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cxf.configuration.ConfiguredBeanLocator
ConfiguredBeanLocator.BeanLoaderListener<T>
-
Constructor Summary
ConstructorsConstructorDescriptionOSGiBeanLocator
(ConfiguredBeanLocator c, org.osgi.framework.BundleContext ctx) -
Method Summary
Modifier and TypeMethodDescriptiongetBeanNamesOfType
(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.boolean
hasBeanOfName
(String name) boolean
hasConfiguredPropertyValue
(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> 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.
-
Constructor Details
-
OSGiBeanLocator
-
-
Method Details
-
getBeanOfType
Description copied from interface:ConfiguredBeanLocator
Gets the bean of the given name and type- Specified by:
getBeanOfType
in interfaceConfiguredBeanLocator
- Returns:
- the bean
-
getBeansOfType
Description copied from interface:ConfiguredBeanLocator
Gets all the configured beans of the specific types. Causes them all to be loaded.- Specified by:
getBeansOfType
in 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) 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 interfaceConfiguredBeanLocator
- Returns:
- true if beans of the type were loaded
-
hasConfiguredPropertyValue
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 interfaceConfiguredBeanLocator
- Returns:
- true if the bean has the given property/value
-
getBeanNamesOfType
Description copied from interface:ConfiguredBeanLocator
Gets the names of all the configured beans of the specific type. Does not cause them to be loaded.- Specified by:
getBeanNamesOfType
in interfaceConfiguredBeanLocator
- Returns:
- List of all the bean names for the given type
-
hasBeanOfName
- Specified by:
hasBeanOfName
in interfaceConfiguredBeanLocator
-