public class ModuleDeployer
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
modules
.
Appropriate Plugin
logic is applied throughout the deployment/
un-deployment lifecycle.
In order to initialize modules with the correct application context, this class maintains a reference to the global application context. See the reference documentation for more details.
Constructor and Description |
---|
ModuleDeployer(ModuleFactory moduleFactory)
Construct a ModuleDeployer.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Module |
createModule(ModuleDescriptor moduleDescriptor,
ModuleDeploymentProperties deploymentProperties)
Create a module based on the provided
ModuleDescriptor and
ModuleDeploymentProperties . |
void |
deploy(Module module,
ModuleDescriptor descriptor)
Deploy the given module to this container.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Module>> |
getDeployedModules()
Return a read-only map of deployed modules.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext context) |
void |
undeploy(ModuleDescriptor moduleDescriptor)
Shut down the module indicated by
moduleDescriptor
and remove its registration from the container. |
public ModuleDeployer(ModuleFactory moduleFactory)
moduleFactory
- module factory for creating new Module
instancespublic void setApplicationContext(org.springframework.context.ApplicationContext context)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
context
- the container application contextpublic void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Module>> getDeployedModules()
public Module createModule(ModuleDescriptor moduleDescriptor, ModuleDeploymentProperties deploymentProperties)
ModuleDescriptor
and
ModuleDeploymentProperties
.moduleDescriptor
- descriptor for the moduledeploymentProperties
- deployment related properties for the modulepublic void deploy(Module module, ModuleDescriptor descriptor)
module
- the module to deploydescriptor
- descriptor for the module instancepublic void undeploy(ModuleDescriptor moduleDescriptor)
moduleDescriptor
and remove its registration from the container. Lifecycle
plugins are applied during undeployment.moduleDescriptor
- descriptor for module to be undeployed