public abstract class AbstractSpringContainer extends AbstractLoggableComponent implements IocContainer
IocContainer using spring. spring is an optional dependency in mmm-util-core.| Modifier and Type | Field and Description |
|---|---|
private org.springframework.context.ApplicationContext |
applicationContext
The
ConfigurableApplicationContext to delegate to. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSpringContainer()
The constructor.
|
protected |
AbstractSpringContainer(org.springframework.context.ConfigurableApplicationContext applicationContext)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
This method disposes the container (performs a shutdown and destroys all components).
|
<COMPONENT_API> |
get(Class<COMPONENT_API> apiClass)
This method gets the component that realizes the given
apiClass. |
<COMPONENT_API> |
get(Class<COMPONENT_API> apiClass,
String componentId)
This method gets the component that realizes the given
apiClass and is registered under the given
componentId. |
protected org.springframework.context.ApplicationContext |
getContext() |
boolean |
isDisposed()
This method tests if this object has been
disposed. |
(package private) void |
setContext(org.springframework.context.ApplicationContext context) |
createLogger, doInitialize, getLoggerdoInitialized, getInitializationState, initializeprivate org.springframework.context.ApplicationContext applicationContext
ConfigurableApplicationContext to delegate to.protected AbstractSpringContainer(org.springframework.context.ConfigurableApplicationContext applicationContext)
applicationContext - is the ConfigurableApplicationContext to adapt.protected AbstractSpringContainer()
protected org.springframework.context.ApplicationContext getContext()
void setContext(org.springframework.context.ApplicationContext context)
context - is the ApplicationContext to set.public <COMPONENT_API> COMPONENT_API get(Class<COMPONENT_API> apiClass)
ComponentContainerapiClass.get in interface ComponentContainerCOMPONENT_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 get(Class<COMPONENT_API> apiClass, String componentId)
ComponentContainerapiClass and is registered under the given
componentId.get in interface ComponentContainerCOMPONENT_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()
IocContainerdispose in interface IocContainerdispose in interface AttributeWriteDisposedpublic boolean isDisposed()
AttributeReadDisposeddisposed. A disposed object can
NOT be used anymore.isDisposed in interface AttributeReadDisposedtrue if this object has been disposed.AttributeWriteDisposed.dispose()Copyright © 2001–2016 mmm-Team. All rights reserved.