public class CompositeModule extends AbstractModule
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTION_SEPARATOR |
Constructor and Description |
---|
CompositeModule(ModuleDescriptor descriptor,
ModuleDeploymentProperties deploymentProperties,
java.util.List<Module> modules) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(org.springframework.context.ApplicationListener<?> listener)
Add an application listener to the application context.
|
void |
addProperties(java.util.Properties properties)
Add properties to the environment.
|
void |
addSource(java.lang.Object source) |
void |
destroy()
Destroy this module's application context.
|
org.springframework.context.ConfigurableApplicationContext |
getApplicationContext() |
<T> T |
getComponent(java.lang.Class<T> requiredType)
Get a bean instance by its class.
|
<T> T |
getComponent(java.lang.String componentName,
java.lang.Class<T> requiredType)
Get a bean instance by its name and class.
|
java.util.Properties |
getProperties()
Get the module's properties.
|
void |
initialize() |
boolean |
isRunning() |
void |
setParentContext(org.springframework.context.ApplicationContext parentContext)
set a parent application context
|
void |
start() |
void |
stop() |
getDeploymentProperties, getDescriptor, getName, getType, shouldBind, toString
public static final java.lang.String OPTION_SEPARATOR
public CompositeModule(ModuleDescriptor descriptor, ModuleDeploymentProperties deploymentProperties, java.util.List<Module> modules)
public void initialize()
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
public void setParentContext(org.springframework.context.ApplicationContext parentContext)
Module
public void addListener(org.springframework.context.ApplicationListener<?> listener)
Module
listener
- the listenerpublic void addSource(java.lang.Object source)
source
- can be a configuration class, bean definition Resource
(e.g. XML or groovy file), or an annotated component, or an array of such objects.SpringApplicationBuilder.sources
public void addProperties(java.util.Properties properties)
Module
public java.util.Properties getProperties()
Module
public <T> T getComponent(java.lang.Class<T> requiredType)
Module
requiredType
- the class of the target beanpublic <T> T getComponent(java.lang.String componentName, java.lang.Class<T> requiredType)
Module
componentName
- the name of the target beanrequiredType
- the class of the target beanpublic void destroy()
Module
public void start()
public void stop()
public boolean isRunning()