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, toStringpublic 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)
Modulepublic void addListener(org.springframework.context.ApplicationListener<?> listener)
Modulelistener - 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.sourcespublic void addProperties(java.util.Properties properties)
Modulepublic java.util.Properties getProperties()
Modulepublic <T> T getComponent(java.lang.Class<T> requiredType)
ModulerequiredType - the class of the target beanpublic <T> T getComponent(java.lang.String componentName,
java.lang.Class<T> requiredType)
ModulecomponentName - the name of the target beanrequiredType - the class of the target beanpublic void destroy()
Modulepublic void start()
public void stop()
public boolean isRunning()