public class LazyMuleArtifactContext extends MuleArtifactContext implements LazyComponentInitializerAdapter, ComponentModelInitializer
MuleArtifactContext that allows to create configuration components lazily.
Components will be created upon request to use the from the exposed services.org.springframework.core.io.DefaultResourceLoader.ClassPathContextResourceLazyComponentInitializer.ComponentLocationFilter| Modifier and Type | Field and Description |
|---|---|
static String |
SHARED_PARTITIONED_PERSISTENT_OBJECT_STORE_PATH |
componentLocator, INNER_BEAN_PREFIX, memoryManagementService, objectProvidersAPPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMELAZY_COMPONENT_INITIALIZER_SERVICE_KEYAPPLICATION_STARTUP_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME| Constructor and Description |
|---|
LazyMuleArtifactContext(MuleContext muleContext,
org.mule.runtime.ast.api.ArtifactAst artifactAst,
OptionalObjectsController optionalObjectsController,
Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties,
BaseConfigurationComponentLocator baseConfigurationComponentLocator,
ContributedErrorTypeRepository errorTypeRepository,
ContributedErrorTypeLocator errorTypeLocator,
Map<String,String> artifactProperties,
boolean addToolingObjectsToRegistry,
ArtifactType artifactType,
Optional<ComponentModelInitializer> parentComponentModelInitializer,
org.mule.runtime.api.lock.LockFactory runtimeLockFactory,
ComponentBuildingDefinitionRegistryFactory componentBuildingDefinitionRegistryFactory,
org.mule.runtime.api.memory.management.MemoryManagementService memoryManagementService,
org.mule.runtime.api.config.FeatureFlaggingService featureFlaggingService,
org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService)
Parses configuration files creating a spring ApplicationContext which is used as a parent registry using the SpringRegistry
registry implementation to wraps the spring ApplicationContext
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected SpringMuleContextServiceConfigurator |
createServiceConfigurator(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory) |
protected List<org.mule.runtime.api.util.Pair<String,org.mule.runtime.ast.api.ComponentAst>> |
doCreateApplicationComponents(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory,
org.mule.runtime.ast.api.ArtifactAst minimalAppModel,
boolean mustBeRoot,
Map<org.mule.runtime.ast.api.ComponentAst,SpringComponentModel> springComponentModels)
Apart from calling
MuleArtifactContext.createApplicationComponents(DefaultListableBeanFactory, ArtifactAst, boolean) from the
superclass, will handle orphan processors. |
Optional<org.mule.runtime.config.internal.context.lazy.LazyMuleArtifactContext.ComponentModelInitializerAdapter> |
getParentComponentModelInitializerAdapter(boolean applyStartPhase) |
void |
initializeComponent(org.mule.runtime.api.component.location.Location location)
Calling this method guarantees that the requested component from the configuration will be created, initialized and started.
|
void |
initializeComponent(org.mule.runtime.api.component.location.Location location,
boolean applyStartPhase)
Calling this method guarantees that the requested component from the configuration will be created and initialized.
|
void |
initializeComponents(LazyComponentInitializer.ComponentLocationFilter filter)
Calling this method guarantees that the components accepted by the filter from the configuration will be created, initialized
and started.
|
void |
initializeComponents(LazyComponentInitializer.ComponentLocationFilter filter,
boolean applyStartPhase)
Calling this method guarantees that the components accepted by the filter from the configuration will be created and
initialized.
|
void |
initializeComponents(Predicate<org.mule.runtime.ast.api.ComponentAst> componentModelPredicate,
boolean applyStartPhase)
Initializes the
|
protected void |
loadBeanDefinitions(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory) |
protected void |
prepareBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected void |
prepareObjectProviders() |
protected void |
registerErrors(org.mule.runtime.ast.api.ArtifactAst artifactAst) |
protected void |
validateArtifact(org.mule.runtime.ast.api.ArtifactAst artifactAst) |
addBeanPostProcessors, createApplicationComponents, createBeanFactory, customizeBeanFactory, doRegisterErrors, doValidateModel, getApplicationModel, getArtifactType, getConfigurationProperties, getCoreFunctionsProvider, getMuleContext, getMuleRegistry, getOptionalObjectsController, getRegistry, getResourceLocator, getServiceDiscoverer, initialize, isAddToolingObjectsToRegistry, isIgnored, isRunning, postProcessBeanDefinition, postProcessBeanFactory, registerApplicationExtensionModel, registerInjectorProcessor, registerObjectFromObjectProviders, resolveRootComponents, toStringafterPropertiesSet, getConfigLocations, getDefaultConfigLocations, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setIdassertBeanFactoryActive, cancelRefresh, closeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesaddApplicationListener, addBeanFactoryPostProcessor, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroy, destroyBeans, doClose, findAnnotationOnBean, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getApplicationName, getApplicationStartup, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, start, stopaddProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String SHARED_PARTITIONED_PERSISTENT_OBJECT_STORE_PATH
public LazyMuleArtifactContext(MuleContext muleContext, org.mule.runtime.ast.api.ArtifactAst artifactAst, OptionalObjectsController optionalObjectsController, Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties, BaseConfigurationComponentLocator baseConfigurationComponentLocator, ContributedErrorTypeRepository errorTypeRepository, ContributedErrorTypeLocator errorTypeLocator, Map<String,String> artifactProperties, boolean addToolingObjectsToRegistry, ArtifactType artifactType, Optional<ComponentModelInitializer> parentComponentModelInitializer, org.mule.runtime.api.lock.LockFactory runtimeLockFactory, ComponentBuildingDefinitionRegistryFactory componentBuildingDefinitionRegistryFactory, org.mule.runtime.api.memory.management.MemoryManagementService memoryManagementService, org.mule.runtime.api.config.FeatureFlaggingService featureFlaggingService, org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService) throws org.springframework.beans.BeansException
muleContext - the MuleContext that own this contextartifactAst - the definition of the artifact to create a context foroptionalObjectsController - the OptionalObjectsController to use. Cannot be null @see
org.mule.runtime.config.internal.SpringRegistryparentConfigurationProperties - the resolver for properties from the parent artifact to be used as fallback
in this artifact.baseConfigurationComponentLocator - indirection to the actual ConfigurationComponentLocator in the full
registryerrorTypeRepository - repository where the errors of the artifact will be registered.errorTypeLocator - locator where the errors of the artifact will be registered.artifactProperties - map of properties that can be referenced from the
artifactConfigResources as external configuration valuesartifactType - the type of artifact to determine the base objects of the created context.parentComponentModelInitializer - runtimeLockFactory - componentBuildingDefinitionRegistryFactory - featureFlaggingService - org.springframework.beans.BeansExceptionprotected SpringMuleContextServiceConfigurator createServiceConfigurator(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory)
createServiceConfigurator in class MuleArtifactContextprotected void validateArtifact(org.mule.runtime.ast.api.ArtifactAst artifactAst)
validateArtifact in class MuleArtifactContextprotected void registerErrors(org.mule.runtime.ast.api.ArtifactAst artifactAst)
registerErrors in class MuleArtifactContextprotected void prepareBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
prepareBeanFactory in class MuleArtifactContextpublic void initializeComponent(org.mule.runtime.api.component.location.Location location)
LazyComponentInitializerinitializeComponent in interface LazyComponentInitializerlocation - the location of the configuration component.public void initializeComponents(LazyComponentInitializer.ComponentLocationFilter filter)
LazyComponentInitializerinitializeComponents in interface LazyComponentInitializerfilter - LazyComponentInitializer.ComponentLocationFilter to select the Component to be initialized and they
dependent ones.public void initializeComponent(org.mule.runtime.api.component.location.Location location,
boolean applyStartPhase)
LazyComponentInitializerAdapterinitializeComponent in interface LazyComponentInitializerAdapterlocation - the location of the configuration component.applyStartPhase - boolean indicating if the Start phase should be applied to the created componentspublic void initializeComponents(LazyComponentInitializer.ComponentLocationFilter filter, boolean applyStartPhase)
LazyComponentInitializerAdapterinitializeComponents in interface LazyComponentInitializerAdapterfilter - ComponentLocationFilter to select the Component to be initialized and they
dependent ones.applyStartPhase - boolean indicating if the Start phase should be applied to the created componentspublic void initializeComponents(Predicate<org.mule.runtime.ast.api.ComponentAst> componentModelPredicate, boolean applyStartPhase)
ComponentModelInitializerinitializeComponents in interface ComponentModelInitializercomponentModelPredicate - a Predicate for ComponentAst to be initialized.applyStartPhase - boolean indicating if the Start phase should be applied to the created componentspublic Optional<org.mule.runtime.config.internal.context.lazy.LazyMuleArtifactContext.ComponentModelInitializerAdapter> getParentComponentModelInitializerAdapter(boolean applyStartPhase)
protected List<org.mule.runtime.api.util.Pair<String,org.mule.runtime.ast.api.ComponentAst>> doCreateApplicationComponents(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory, org.mule.runtime.ast.api.ArtifactAst minimalAppModel, boolean mustBeRoot, Map<org.mule.runtime.ast.api.ComponentAst,SpringComponentModel> springComponentModels)
MuleArtifactContext.createApplicationComponents(DefaultListableBeanFactory, ArtifactAst, boolean) from the
superclass, will handle orphan processors. That is, processors that are part of the minimal app but for which the containing
flow is not.doCreateApplicationComponents in class MuleArtifactContextprotected void prepareObjectProviders()
prepareObjectProviders in class MuleArtifactContextpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.context.ConfigurableApplicationContextclose in class MuleArtifactContextprotected void loadBeanDefinitions(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory)
loadBeanDefinitions in class MuleArtifactContextCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.