public class ModuleFactory
extends java.lang.Object
implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.ResourceLoaderAware
Module
to create from the Module's metadata and creates a module instance. Also,
resolves ModuleOptions
in the process.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODULE_EXECUTION_FRAMEWORK_KEY
This key is used by the module to define the execution framework(spark streaming, reactor etc.,) to be used when
deploying it.
|
Constructor and Description |
---|
ModuleFactory(ModuleOptionsMetadataResolver moduleOptionsMetadataResolver) |
Modifier and Type | Method and Description |
---|---|
Module |
createModule(ModuleDescriptor moduleDescriptor,
ModuleDeploymentProperties deploymentProperties)
Create a new
SimpleModule or
CompositeModule instance from inspecting the
ModuleDescriptor , particularly the descriptor's
ModuleDefinition . |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
public static final java.lang.String MODULE_EXECUTION_FRAMEWORK_KEY
public ModuleFactory(ModuleOptionsMetadataResolver moduleOptionsMetadataResolver)
moduleOptionsMetadataResolver
- Used to bind configured ModuleOptions
to Module
instancespublic Module createModule(ModuleDescriptor moduleDescriptor, ModuleDeploymentProperties deploymentProperties)
SimpleModule
or
CompositeModule
instance from inspecting the
ModuleDescriptor
, particularly the descriptor's
ModuleDefinition
.moduleDescriptor
- contains the module's runtime configuration (required)deploymentProperties
- contains deployment properties (may be null)public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware