public abstract class AbstractConfigurationBuilder extends Object implements ConfigurationBuilder
ConfigurationBuilder
implementations that handles the logic of
creating config arrays and Properties
argumentsConfigurationBuilder
Modifier and Type | Field and Description |
---|---|
protected List<ServiceConfigurator> |
serviceConfigurators |
Constructor and Description |
---|
AbstractConfigurationBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addServiceConfigurator(ServiceConfigurator serviceConfigurator)
Adds a service configurator to be used on the context being built.
|
protected void |
applyLifecycle(LifecycleManager lifecycleManager)
Allows a configuration builder to check and customise the lifecycle of objects in the registry being used.
|
void |
configure(MuleContext muleContext)
Will configure a MuleContext object based on the builders configuration settings.
|
protected abstract void |
doConfigure(MuleContext muleContext)
Will configure a MuleContext based on the configuration provided.
|
protected final List<ServiceConfigurator> serviceConfigurators
public void addServiceConfigurator(ServiceConfigurator serviceConfigurator)
addServiceConfigurator
in interface ConfigurationBuilder
serviceConfigurator
- service to add. Non null.public void configure(MuleContext muleContext) throws ConfigurationException
doConfigure(org.mule.runtime.core.api.MuleContext)
configure
in interface ConfigurationBuilder
muleContext
- The current MuleContext
ConfigurationException
- if the configuration fails i.e. an object cannot be created or initialised properlyprotected abstract void doConfigure(MuleContext muleContext) throws Exception
ConfigurationBuilder
implementation as bean properties before this method has been
called.muleContext
- The current MuleContext
ConfigurationException
- if the configuration fails i.e. an object cannot be created or initialised properlyException
protected void applyLifecycle(LifecycleManager lifecycleManager) throws Exception
// 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);
}
lifecycleManager
- the lifecycleManager for the current contextException
- if anything goes wrong. Usually this is an exeption bubbled up from calling a lifecycle method on an object
in the registryCopyright © 2018. All rights reserved.