Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Direct Known Subclasses:
  ReloadableBuilder, WebappMuleXmlConfigurationBuilder

    public class SpringXmlConfigurationBuilder

extends AbstractResourceConfigurationBuilder

`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).

Field Summary
`static String` | `MULE_DEFAULTS_CONFIG`
`static String` | `MULE_SPRING_CONFIG`
`protected org.springframework.context.ApplicationContext` | `parentContext`
`protected Registry` | `registry`
`protected boolean` | `useDefaultConfigResource` Prepend "default-mule-config.xml" to the list of config resources.

Fields inherited from class org.mule.config.builders.AbstractResourceConfigurationBuilder
`configResources, logger`

Fields inherited from class org.mule.config.builders.AbstractConfigurationBuilder
`configured`

Constructor Summary
`SpringXmlConfigurationBuilder(ConfigResource[] configResources)`
`SpringXmlConfigurationBuilder(String configResources)`
`SpringXmlConfigurationBuilder(String[] configResources)`

Method Summary
`protected void` | `applyLifecycle(LifecycleManager lifecycleManager)` Allows a configuration builder to check and customise the lifecycle of objects in the registry being used.
`protected org.springframework.context.ApplicationContext` | `createApplicationContext(MuleContext muleContext, ConfigResource[] configResources)`
`protected void` | `createSpringRegistry(MuleContext muleContext, org.springframework.context.ApplicationContext applicationContext)`
`protected void` | `doConfigure(MuleContext muleContext)` Will configure a MuleContext based on the configuration provided.
`protected org.springframework.context.ApplicationContext` | `getParentContext()`
`boolean` | `isUseDefaultConfigResource()`
`void` | `setParentContext(org.springframework.context.ApplicationContext parentContext)`
`void` | `setUseDefaultConfigResource(boolean useDefaultConfigResource)`
`void` | `unconfigure(MuleContext muleContext)`

Methods inherited from class org.mule.config.builders.AbstractResourceConfigurationBuilder
`configure, createConfigResourcesString, loadConfigResources`

Methods inherited from class org.mule.config.builders.AbstractConfigurationBuilder
`isConfigured`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

### useDefaultConfigResource

    protected boolean useDefaultConfigResource

  Prepend "default-mule-config.xml" to the list of config resources.

### registry

    protected Registry registry

### parentContext

    protected org.springframework.context.ApplicationContext parentContext

Constructor Detail

### SpringXmlConfigurationBuilder

    public SpringXmlConfigurationBuilder(String[] configResources)
                                  throws ConfigurationException

Throws:
  `ConfigurationException`

### SpringXmlConfigurationBuilder

    public SpringXmlConfigurationBuilder(String configResources)
                                  throws ConfigurationException

Throws:
  `ConfigurationException`

### SpringXmlConfigurationBuilder

    public SpringXmlConfigurationBuilder(ConfigResource[] configResources)

Method Detail

### 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)

### getParentContext

    protected org.springframework.context.ApplicationContext getParentContext()

### setParentContext

    public void setParentContext(org.springframework.context.ApplicationContext parentContext)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.