public interface Module
extends org.springframework.context.Lifecycle
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.
|
ModuleDeploymentProperties |
getDeploymentProperties() |
ModuleDescriptor |
getDescriptor() |
java.lang.String |
getName() |
java.util.Properties |
getProperties()
Get the module's properties.
|
ModuleType |
getType() |
void |
initialize() |
void |
setParentContext(org.springframework.context.ApplicationContext parentContext)
set a parent application context
|
boolean |
shouldBind()
Should the module require messagebus binding.
|
void initialize()
java.lang.String getName()
ModuleType getType()
ModuleDescriptor getDescriptor()
ModuleDeploymentProperties getDeploymentProperties()
org.springframework.context.ConfigurableApplicationContext getApplicationContext()
void setParentContext(org.springframework.context.ApplicationContext parentContext)
parentContext
- 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
void addProperties(java.util.Properties properties)
properties
- void addListener(org.springframework.context.ApplicationListener<?> listener)
listener
- the listenerjava.util.Properties getProperties()
<T> T getComponent(java.lang.Class<T> requiredType)
requiredType
- the class of the target bean<T> T getComponent(java.lang.String componentName, java.lang.Class<T> requiredType)
componentName
- the name of the target beanrequiredType
- the class of the target beanvoid destroy()
boolean shouldBind()