public class SpringBlueprintContainer extends java.lang.Object implements BlueprintContainer
BlueprintContainer implementation. Wraps Spring's ConfigurableListableBeanFactory in the
BlueprintContainer interface.
Note: This class does not fully implements the Blueprint contract: for example it does not fire any of the
Blueprint events nor performs exception handling - these concerns are left to the Blueprint extender.| Modifier and Type | Field and Description |
|---|---|
private org.springframework.context.ConfigurableApplicationContext |
applicationContext |
private org.springframework.beans.factory.config.ConfigurableListableBeanFactory |
beanFactory |
| Constructor and Description |
|---|
SpringBlueprintContainer(org.springframework.context.ConfigurableApplicationContext applicationContext) |
| Modifier and Type | Method and Description |
|---|---|
private org.springframework.beans.factory.config.ConfigurableListableBeanFactory |
getBeanFactory() |
java.util.Set<java.lang.String> |
getComponentIds()
Returns the set of component ids managed by this Blueprint Container.
|
java.lang.Object |
getComponentInstance(java.lang.String name)
Return the component instance for the specified component id.
|
private <T extends ComponentMetadata> |
getComponentMetadata(java.lang.Class<T> clazz) |
ComponentMetadata |
getComponentMetadata(java.lang.String name)
Return the Component Metadata object for the component with the specified
component id.
|
private java.util.Collection<ComponentMetadata> |
getComponentMetadataForAllComponents() |
java.util.Collection<?> |
getMetadata(java.lang.Class type)
Return all
ComponentMetadata objects of the specified Component
Metadata type. |
private final org.springframework.context.ConfigurableApplicationContext applicationContext
private volatile org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory
public SpringBlueprintContainer(org.springframework.context.ConfigurableApplicationContext applicationContext)
public java.lang.Object getComponentInstance(java.lang.String name)
throws NoSuchComponentException
BlueprintContainergetComponentInstance in interface BlueprintContainername - The component id for the requested component instance.NoSuchComponentException - If no component with the specified
component id is managed by this Blueprint Container.public ComponentMetadata getComponentMetadata(java.lang.String name) throws NoSuchComponentException
BlueprintContainergetComponentMetadata in interface BlueprintContainername - The component id for the requested Component Metadata.NoSuchComponentException - If no component with the specified
component id is managed by this Blueprint Container.public java.util.Set<java.lang.String> getComponentIds()
BlueprintContainergetComponentIds in interface BlueprintContainerpublic java.util.Collection<?> getMetadata(java.lang.Class type)
BlueprintContainerComponentMetadata objects of the specified Component
Metadata type. The supported Component Metadata types are
ComponentMetadata (which returns the Component Metadata for all
defined manager types), BeanMetadata ,
ServiceReferenceMetadata (which returns both
ReferenceMetadata and ReferenceListMetadata objects), and
ServiceMetadata. The collection will include all Component
Metadata objects of the requested type, including components that are
declared inline.getMetadata in interface BlueprintContainertype - The super type or type of the requested Component Metadata
objects.private <T extends ComponentMetadata> java.util.Collection<T> getComponentMetadata(java.lang.Class<T> clazz)
private java.util.Collection<ComponentMetadata> getComponentMetadataForAllComponents()
private org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()