public class MuleArtifactContext
extends org.springframework.context.support.AbstractXmlApplicationContext
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 boolean |
useNewParsingMechanism |
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)
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,
org.springframework.core.io.Resource[] artifactConfigResources,
org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration,
OptionalObjectsController optionalObjectsController,
Map<String,String> artifactProperties,
ArtifactType artifactType,
List<ClassLoader> pluginsClassLoaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected List<String> |
createApplicationComponents(DefaultListableBeanFactory beanFactory,
ApplicationModel applicationModel,
boolean mustBeRoot) |
protected MuleBeanDefinitionDocumentReader |
createBeanDefinitionDocumentReader(BeanDefinitionFactory beanDefinitionFactory) |
protected org.springframework.beans.factory.support.BeanDefinitionReader |
createBeanDefinitionReader(DefaultListableBeanFactory beanFactory) |
protected DefaultListableBeanFactory |
createBeanFactory() |
protected void |
createInitialApplicationComponents(DefaultListableBeanFactory beanFactory,
org.springframework.beans.factory.support.BeanDefinitionReader beanDefinitionReader) |
protected MuleDocumentLoader |
createLoader() |
protected void |
customizeBeanFactory(DefaultListableBeanFactory beanFactory) |
protected Class<? extends MuleBeanDefinitionDocumentReader> |
getBeanDefinitionDocumentReaderClass() |
protected org.springframework.core.io.Resource[] |
getConfigResources() |
ConnectivityTestingService |
getConnectivityTestingService() |
static ThreadLocal<MuleContext> |
getCurrentMuleContext() |
org.mule.runtime.api.metadata.MetadataService |
getMetadataService() |
MuleContext |
getMuleContext() |
protected String |
getOldParsingMechanismComponentIdentifiers() |
protected OptionalObjectsController |
getOptionalObjectsController() |
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(ComponentModel 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.support.BeanDefinitionRegistry registry) |
protected void |
registerPostProcessor(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.RootBeanDefinition definition,
String beanName) |
initBeanDefinitionReader, loadBeanDefinitions, setValidatingafterPropertiesSet, getConfigLocations, getDefaultConfigLocations, resolvePath, setBeanName, setConfigLocation, setConfigLocations, setIdassertBeanFactoryActive, cancelRefresh, closeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesaddApplicationListener, addBeanFactoryPostProcessor, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroy, 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 boolean useNewParsingMechanism
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) 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.SpringRegistrypluginsClassLoaders - the classloades of the plugins included in the artifact, on hwich contexts the parsers will
process.org.springframework.beans.BeansExceptionpublic MuleArtifactContext(MuleContext muleContext, org.springframework.core.io.Resource[] artifactConfigResources, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, OptionalObjectsController optionalObjectsController, 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.AbstractApplicationContextprotected org.springframework.core.io.Resource[] getConfigResources()
getConfigResources in class org.springframework.context.support.AbstractXmlApplicationContextprotected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException
loadBeanDefinitions in class org.springframework.context.support.AbstractXmlApplicationContextIOExceptionprotected void createInitialApplicationComponents(DefaultListableBeanFactory beanFactory, org.springframework.beans.factory.support.BeanDefinitionReader beanDefinitionReader)
protected List<String> createApplicationComponents(DefaultListableBeanFactory beanFactory, ApplicationModel applicationModel, boolean mustBeRoot)
protected String getOldParsingMechanismComponentIdentifiers()
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 org.springframework.beans.factory.support.BeanDefinitionReader createBeanDefinitionReader(DefaultListableBeanFactory beanFactory)
protected MuleBeanDefinitionDocumentReader createBeanDefinitionDocumentReader(BeanDefinitionFactory beanDefinitionFactory)
protected MuleDocumentLoader createLoader()
protected void registerInjectorProcessor(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
protected void registerPostProcessor(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.RootBeanDefinition definition,
String beanName)
protected Class<? extends MuleBeanDefinitionDocumentReader> getBeanDefinitionDocumentReaderClass()
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(ComponentModel 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()
protected OptionalObjectsController getOptionalObjectsController()
public static ThreadLocal<MuleContext> getCurrentMuleContext()
public void initializeComponent(org.mule.runtime.api.component.location.Location location)
public ConnectivityTestingService getConnectivityTestingService()
public org.mule.runtime.api.metadata.MetadataService getMetadataService()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.