public class MuleArtifactContext
extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext
MuleArtifactContext is a simple extension application context that allows resources to be loaded from the
Classpath of file system using the MuleBeanDefinitionReader.| Modifier and Type | Field and Description |
|---|---|
protected ApplicationModel |
applicationModel |
protected BeanDefinitionFactory |
beanDefinitionFactory |
protected ComponentBuildingDefinitionRegistry |
componentBuildingDefinitionRegistry |
static String |
INNER_BEAN_PREFIX |
protected MuleContext |
muleContext |
protected XmlApplicationParser |
xmlApplicationParser |
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMECONFIG_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 |
|---|
MuleArtifactContext(MuleContext muleContext,
ConfigResource[] artifactConfigResources,
org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration,
OptionalObjectsController optionalObjectsController,
Map<String,String> artifactProperties,
ArtifactType artifactType,
List<ClassLoader> pluginsClassLoaders,
Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties)
Parses configuration files creating a spring ApplicationContext which is used as a parent registry using the SpringRegistry
registry implementation to wraps the spring ApplicationContext
|
MuleArtifactContext(MuleContext muleContext,
ConfigResource[] artifactConfigResources,
org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration,
OptionalObjectsController optionalObjectsController,
Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties,
Map<String,String> artifactProperties,
ArtifactType artifactType,
List<ClassLoader> pluginsClassLoaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static org.springframework.core.io.Resource[] |
convert(ConfigResource[] resources) |
protected List<String> |
createApplicationComponents(DefaultListableBeanFactory beanFactory,
ApplicationModel applicationModel,
boolean mustBeRoot) |
protected DefaultListableBeanFactory |
createBeanFactory() |
protected void |
createInitialApplicationComponents(DefaultListableBeanFactory beanFactory) |
protected void |
customizeBeanFactory(DefaultListableBeanFactory beanFactory) |
void |
destroy() |
ConfigurationDependencyResolver |
getDependencyResolver() |
MuleContext |
getMuleContext() |
OptionalObjectsController |
getOptionalObjectsController() |
void |
getPrototypeBeanWithRootContainer(String name,
String rootContainerName)
Returns a prototype chain of processors mutating the root container name of the set of beans created from that prototype
object.
|
void |
initializeComponent(org.mule.runtime.api.component.location.Location location) |
boolean |
isRunning()
This implementation returns
false if the context hasn't been initialised yet, in opposition to the
default implementation which throws an exception |
protected void |
loadBeanDefinitions(DefaultListableBeanFactory beanFactory) |
protected XmlConfigurationDocumentLoader |
newXmlConfigurationDocumentLoader() |
protected static void |
postProcessBeanDefinition(SpringComponentModel resolvedComponent,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
String beanName)
Forces the registration of instances of
TransformerResolver and Converter to be created, so that
PostRegistrationActionsPostProcessor can work its magic and add them to the transformation graph |
protected void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected void |
prepareBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected void |
registerInjectorProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected void |
registerPostProcessor(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.RootBeanDefinition definition,
String beanName) |
afterPropertiesSet, 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, 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, obtainFreshBeanFactory, onClose, onRefresh, prepareRefresh, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, setDisplayName, setEnvironment, setParent, start, stop, toStringgetClassLoader, getResource, getResourceByPath, setClassLoaderpublic static final String INNER_BEAN_PREFIX
protected final ComponentBuildingDefinitionRegistry componentBuildingDefinitionRegistry
protected ApplicationModel applicationModel
protected MuleContext muleContext
protected BeanDefinitionFactory beanDefinitionFactory
protected final XmlApplicationParser xmlApplicationParser
public MuleArtifactContext(MuleContext muleContext, ConfigResource[] artifactConfigResources, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, OptionalObjectsController optionalObjectsController, Map<String,String> artifactProperties, ArtifactType artifactType, List<ClassLoader> pluginsClassLoaders, Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties) 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.spring.internal.SpringRegistrypluginsClassLoaders - the classloades of the plugins included in the artifact, on hwich contexts the parsers will
process.parentConfigurationProperties - org.springframework.beans.BeansExceptionpublic MuleArtifactContext(MuleContext muleContext, ConfigResource[] artifactConfigResources, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, OptionalObjectsController optionalObjectsController, Optional<org.mule.runtime.api.component.ConfigurationProperties> parentConfigurationProperties, Map<String,String> artifactProperties, ArtifactType artifactType, List<ClassLoader> pluginsClassLoaders)
protected XmlConfigurationDocumentLoader newXmlConfigurationDocumentLoader()
protected void prepareBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
prepareBeanFactory in class org.springframework.context.support.AbstractApplicationContextpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.context.ConfigurableApplicationContextclose in class org.springframework.context.support.AbstractApplicationContextpublic static org.springframework.core.io.Resource[] convert(ConfigResource[] resources)
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException
loadBeanDefinitions in class org.springframework.context.support.AbstractRefreshableApplicationContextIOExceptionprotected void createInitialApplicationComponents(DefaultListableBeanFactory beanFactory)
public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeandestroy in class org.springframework.context.support.AbstractApplicationContextprotected List<String> createApplicationComponents(DefaultListableBeanFactory beanFactory, ApplicationModel applicationModel, boolean mustBeRoot)
public ConfigurationDependencyResolver getDependencyResolver()
protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory)
customizeBeanFactory in class org.springframework.context.support.AbstractRefreshableApplicationContextprotected void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
postProcessBeanFactory in class org.springframework.context.support.AbstractApplicationContextprotected void registerInjectorProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
protected void registerPostProcessor(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.RootBeanDefinition definition,
String beanName)
protected DefaultListableBeanFactory createBeanFactory()
createBeanFactory in class org.springframework.context.support.AbstractRefreshableApplicationContextpublic boolean isRunning()
false if the context hasn't been initialised yet, in opposition to the
default implementation which throws an exceptionisRunning in interface org.springframework.context.LifecycleisRunning in class org.springframework.context.support.AbstractApplicationContextprotected static void postProcessBeanDefinition(SpringComponentModel resolvedComponent, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String beanName)
TransformerResolver and Converter to be created, so that
PostRegistrationActionsPostProcessor can work its magic and add them to the transformation graphpublic MuleContext getMuleContext()
public OptionalObjectsController getOptionalObjectsController()
public void initializeComponent(org.mule.runtime.api.component.location.Location location)
public void getPrototypeBeanWithRootContainer(String name, String rootContainerName)
name - the bean namerootContainerName - the new root container name.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.