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 |
applicationModel, beanDefinitionFactory, componentBuildingDefinitionRegistry, componentLocator, INNER_BEAN_PREFIX, muleContext, objectProvidersAPPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMELAZY_COMPONENT_INITIALIZER_SERVICE_KEYCONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME| Constructor and Description |
|---|
LazyMuleArtifactContext(MuleContext muleContext,
org.mule.runtime.dsl.api.ConfigResource[] artifactConfigResources,
org.mule.runtime.app.declaration.api.ArtifactDeclaration artifactDeclaration,
OptionalObjectsController optionalObjectsController,
Map<String,String> artifactProperties,
ArtifactType artifactType,
List<ClassLoader> pluginsClassLoaders,
Optional<ComponentModelInitializer> parentComponentModelInitializer,
Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties,
boolean disableXmlValidations,
org.mule.runtime.dsl.api.component.ComponentBuildingDefinitionProvider runtimeComponentBuildingDefinitionProvider,
org.mule.runtime.api.lock.LockFactory runtimeLockFactory)
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() |
Optional<org.mule.runtime.config.internal.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<ComponentModel> componentModelPredicate,
boolean applyStartPhase)
Initializes the
componentModels that match for the predicate. |
protected void |
prepareObjectProviders() |
addBeanPostProcessors, convert, createApplicationComponents, createBeanFactory, customizeBeanFactory, destroy, getArtifactConfigResources, getArtifactName, getArtifactProperties, getDependencyResolver, getExecutionClassLoader, getExtensions, getMuleContext, getOptionalObjectsController, getPrototypeBeanWithRootContainer, getRegistry, isRunning, loadBeanDefinitions, postProcessBeanDefinition, postProcessBeanFactory, prepareBeanFactory, registerInjectorProcessor, registerObjectFromObjectProviders, registerPostProcessor, toStringafterPropertiesSet, getConfigLocations, getDefaultConfigLocations, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setIdassertBeanFactoryActive, cancelRefresh, closeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesaddApplicationListener, addBeanFactoryPostProcessor, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroyBeans, doClose, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getApplicationName, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, resetCommonCaches, 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.dsl.api.ConfigResource[] artifactConfigResources, org.mule.runtime.app.declaration.api.ArtifactDeclaration artifactDeclaration, OptionalObjectsController optionalObjectsController, Map<String,String> artifactProperties, ArtifactType artifactType, List<ClassLoader> pluginsClassLoaders, Optional<ComponentModelInitializer> parentComponentModelInitializer, Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties, boolean disableXmlValidations, org.mule.runtime.dsl.api.component.ComponentBuildingDefinitionProvider runtimeComponentBuildingDefinitionProvider, org.mule.runtime.api.lock.LockFactory runtimeLockFactory) throws org.springframework.beans.BeansException
muleContext - the MuleContext that own this contextartifactDeclaration - the mule configuration defined programmaticallyoptionalObjectsController - the OptionalObjectsController to use. Cannot be null @see
org.mule.runtime.config.internal.SpringRegistryparentConfigurationProperties - disableXmlValidations - true when loading XML configs it will not apply validations.runtimeComponentBuildingDefinitionProvider - provider for the runtime ComponentBuildingDefinitionsorg.springframework.beans.BeansExceptionpublic 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<ComponentModel> componentModelPredicate, boolean applyStartPhase)
ComponentModelInitializercomponentModels that match for the predicate.initializeComponents in interface ComponentModelInitializercomponentModelPredicate - a Predicate for ComponentModel to be initialized.applyStartPhase - boolean indicating if the Start phase should be applied to the created componentspublic Optional<org.mule.runtime.config.internal.LazyMuleArtifactContext.ComponentModelInitializerAdapter> getParentComponentModelInitializerAdapter(boolean applyStartPhase)
protected void prepareObjectProviders()
prepareObjectProviders in class MuleArtifactContextpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.context.ConfigurableApplicationContextclose in class MuleArtifactContextCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.