public abstract class LifecycleAwareConfigurationProvider
extends org.mule.runtime.api.component.AbstractComponent
implements org.mule.runtime.extension.api.runtime.config.ConfigurationProvider, org.mule.runtime.api.lifecycle.Lifecycle
ConfigurationProvider which keep track of the ConfigurationInstance they
generate and propagate lifecycle and IoC into them.
It also implements the other common concerns of every ConfigurationProvider, leaving implementations with the need to
"just" implement ConfigurationProvider.get(Event)| Modifier and Type | Field and Description |
|---|---|
protected SimpleLifecycleManager |
lifecycleManager |
protected MuleContext |
muleContext |
| Constructor and Description |
|---|
LifecycleAwareConfigurationProvider(String name,
org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
When needed, fires the
Disposable.dispose() phase on the currently provided configurations |
protected void |
doInitialise()
Template method so subclasses can do initialisation.
|
org.mule.runtime.api.meta.model.config.ConfigurationModel |
getConfigurationModel() |
protected ClassLoader |
getExtensionClassLoader() |
org.mule.runtime.api.meta.model.ExtensionModel |
getExtensionModel() |
String |
getName() |
void |
initialise()
Performs dependency injection into all the currently provided configurations, and when needed, fires the
Initialisable.initialise() phase on them |
protected void |
registerConfiguration(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance configuration)
Implementations are to invoke this method everytime they create a new
ConfigurationInstance so that they're kept
track of and the lifecycle can be propagated |
void |
start()
When needed, fires the
Startable.start() phase on the currently provided configurations |
protected void |
startConfig(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance config) |
void |
stop()
When needed, fires the
Stoppable.stop() phase on the currently provided configurations |
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, initRootContainerName, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final SimpleLifecycleManager lifecycleManager
protected final MuleContext muleContext
public LifecycleAwareConfigurationProvider(String name, org.mule.runtime.api.meta.model.ExtensionModel extensionModel, org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel, MuleContext muleContext)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
Initialisable.initialise() phase on theminitialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationException - if an exception is foundprotected void doInitialise()
public void start()
throws org.mule.runtime.api.exception.MuleException
Startable.start() phase on the currently provided configurationsstart in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleException - if an exception is foundpublic void stop()
throws org.mule.runtime.api.exception.MuleException
Stoppable.stop() phase on the currently provided configurationsstop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleException - if an exception is foundpublic void dispose()
Disposable.dispose() phase on the currently provided configurationsdispose in interface org.mule.runtime.api.lifecycle.Disposableprotected void registerConfiguration(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance configuration)
ConfigurationInstance so that they're kept
track of and the lifecycle can be propagatedconfiguration - a newly created ConfigurationInstancepublic String getName()
getName in interface org.mule.runtime.extension.api.runtime.config.ConfigurationProviderpublic org.mule.runtime.api.meta.model.config.ConfigurationModel getConfigurationModel()
getConfigurationModel in interface org.mule.runtime.extension.api.runtime.config.ConfigurationProviderpublic org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
getExtensionModel in interface org.mule.runtime.extension.api.runtime.config.ConfigurationProviderprotected void startConfig(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance config)
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected ClassLoader getExtensionClassLoader()
Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.