org.mule.config.spring
Class SpringXmlConfigurationBuilder
java.lang.Object
org.mule.config.builders.AbstractConfigurationBuilder
org.mule.config.builders.AbstractResourceConfigurationBuilder
org.mule.config.spring.SpringXmlConfigurationBuilder
- All Implemented Interfaces:
- ConfigurationBuilder, DomainMuleContextAwareConfigurationBuilder
- Direct Known Subclasses:
- SpringXmlDomainConfigurationBuilder, WebappMuleXmlConfigurationBuilder
public class SpringXmlConfigurationBuilder
- extends AbstractResourceConfigurationBuilder
- implements DomainMuleContextAwareConfigurationBuilder
SpringXmlConfigurationBuilder
enables Mule to be configured from a
Spring XML Configuration file used with Mule name-spaces. Multiple configuration
files can be loaded from this builder (specified as a comma-separated list).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MULE_DEFAULTS_CONFIG
public static final String MULE_DEFAULTS_CONFIG
- See Also:
- Constant Field Values
MULE_SPRING_CONFIG
public static final String MULE_SPRING_CONFIG
- See Also:
- Constant Field Values
MULE_MINIMAL_SPRING_CONFIG
public static final String MULE_MINIMAL_SPRING_CONFIG
- See Also:
- Constant Field Values
MULE_REGISTRY_BOOTSTRAP_SPRING_CONFIG
public static final String MULE_REGISTRY_BOOTSTRAP_SPRING_CONFIG
- See Also:
- Constant Field Values
useDefaultConfigResource
protected boolean useDefaultConfigResource
- Prepend "default-mule-config.xml" to the list of config resources.
useMinimalConfigResource
protected boolean useMinimalConfigResource
registry
protected Registry registry
domainContext
protected org.springframework.context.ApplicationContext domainContext
parentContext
protected org.springframework.context.ApplicationContext parentContext
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
SpringXmlConfigurationBuilder
public SpringXmlConfigurationBuilder(String[] configResources)
throws ConfigurationException
- Throws:
ConfigurationException
SpringXmlConfigurationBuilder
public SpringXmlConfigurationBuilder(String configResources)
throws ConfigurationException
- Throws:
ConfigurationException
SpringXmlConfigurationBuilder
public SpringXmlConfigurationBuilder(ConfigResource[] configResources)
doConfigure
protected void doConfigure(MuleContext muleContext)
throws Exception
- Description copied from class:
AbstractConfigurationBuilder
- Will configure a MuleContext based on the configuration provided. The configuration will be set on the
ConfigurationBuilder
implementation as bean properties before this method
has been called.
- Specified by:
doConfigure
in class AbstractConfigurationBuilder
- Parameters:
muleContext
- The current MuleContext
- Throws:
ConfigurationException
- if the configuration fails i.e. an object cannot be created or
initialised properly
Exception
unconfigure
public void unconfigure(MuleContext muleContext)
createApplicationContext
protected org.springframework.context.ApplicationContext createApplicationContext(MuleContext muleContext,
ConfigResource[] configResources)
throws Exception
- Throws:
Exception
createSpringRegistry
protected void createSpringRegistry(MuleContext muleContext,
org.springframework.context.ApplicationContext applicationContext)
throws Exception
- Throws:
Exception
applyLifecycle
protected void applyLifecycle(LifecycleManager lifecycleManager)
throws Exception
- Description copied from class:
AbstractConfigurationBuilder
- Allows a configuration builder to check and customise the lifecycle of objects in the registry
being used. The ONLY time a user should implement this method is if the underlying container for
the Registry is an IoC container had manages it's own lifecycle. If this is the case the lifecycle
manager can be used to call the next lifecycle method on all the objects. For example for the Spring
Registry only Initialise and Dispose phase is handled by Spring. The Start and Stop phases are handled
by Mule by calling-
// If the MuleContext is started, start all objects in the new Registry.
if (lifecycleManager.isPhaseComplete(Startable.PHASE_NAME))
{
lifecycleManager.applyPhase(registry.lookupObjects(Object.class), Startable.PHASE_NAME);
}
- Overrides:
applyLifecycle
in class AbstractConfigurationBuilder
- Parameters:
lifecycleManager
- the lifecycleManager for the current context
- Throws:
Exception
- if anything goes wrong. Usually this is an exeption bubbled up from calling
a lifecycle method on an object in the registry
isUseDefaultConfigResource
public boolean isUseDefaultConfigResource()
setUseDefaultConfigResource
public void setUseDefaultConfigResource(boolean useDefaultConfigResource)
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
setUseMinimalConfigResource
public void setUseMinimalConfigResource(boolean useMinimalConfigResource)
getParentContext
protected org.springframework.context.ApplicationContext getParentContext()
setParentContext
public void setParentContext(org.springframework.context.ApplicationContext parentContext)
setDomainContext
public void setDomainContext(MuleContext domainContext)
- Specified by:
setDomainContext
in interface DomainMuleContextAwareConfigurationBuilder
- Parameters:
domainContext
- MuleContext of the domain.
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.