|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.impl.SpringContainer
public class SpringContainer
This is the implementation of the IocContainer using spring.
ATTENTION:
Please check your dependencies as spring is an optional
dependency in mmm-util-core.
| Field Summary | |
|---|---|
private org.springframework.context.ConfigurableApplicationContext |
applicationContext
The ConfigurableApplicationContext to delegate to. |
| Constructor Summary | |
|---|---|
SpringContainer()
The constructor. |
|
SpringContainer(org.springframework.context.ConfigurableApplicationContext applicationContext)
The constructor. |
|
SpringContainer(String... packages)
The constructor. |
|
| Method Summary | ||
|---|---|---|
void |
dispose()
This method disposes the container (performs a shutdown and destroys all components). |
|
|
getComponent(Class<COMPONENT_API> apiClass)
This method gets the component that realizes the given apiClass. |
|
|
getComponent(Class<COMPONENT_API> apiClass,
String componentId)
This method gets the component that realizes the given apiClass and is registered under the given
componentId. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.springframework.context.ConfigurableApplicationContext applicationContext
ConfigurableApplicationContext to delegate to.
| Constructor Detail |
|---|
public SpringContainer()
public SpringContainer(String... packages)
packages - are the Packages containing components to manage.public SpringContainer(org.springframework.context.ConfigurableApplicationContext applicationContext)
applicationContext - is the ConfigurableApplicationContext to
adapt.| Method Detail |
|---|
public <COMPONENT_API> COMPONENT_API getComponent(Class<COMPONENT_API> apiClass)
apiClass.
getComponent in interface IocContainerCOMPONENT_API - is the generic type of the apiClass.apiClass - is the class reflecting the API of the requested component.
This should be an interface.
public <COMPONENT_API> COMPONENT_API getComponent(Class<COMPONENT_API> apiClass,
String componentId)
apiClass and is registered under the given
componentId.
getComponent in interface IocContainerCOMPONENT_API - is the generic type of the apiClass.apiClass - is the class reflecting the API of the requested component.
This should be an interface.componentId - is the unique ID under which the component is registered
in this container.
public void dispose()
dispose in interface IocContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||