public final class DynamicConfigurationProvider extends LifecycleAwareConfigurationProvider implements org.mule.runtime.extension.api.runtime.config.ExpirableConfigurationProvider
ConfigurationProvider which continuously evaluates the same ResolverSet and then uses the resulting
ResolverSetResult to build an instance of type T
Although each invocation to #get(Object) is guaranteed to end up in an invocation to
#resolverSet#resolve(Object), the resulting ResolverSetResult might not end up generating a new instance. This
is so because ResolverSetResult instances are put in a cache to guarantee that equivalent evaluations of the
resolverSet return the same instance.
lifecycleManager, muleContext| Constructor and Description |
|---|
DynamicConfigurationProvider(String name,
org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel,
ResolverSet resolverSet,
ConnectionProviderValueResolver connectionProviderResolver,
org.mule.runtime.extension.api.runtime.ExpirationPolicy expirationPolicy,
MuleContext muleContext)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialise()
Template method so subclasses can do initialisation.
|
org.mule.runtime.extension.api.runtime.config.ConfigurationInstance |
get(org.mule.runtime.api.event.Event event)
Evaluates
resolverSet using the given event and returns an instance produced with the result. |
List<org.mule.runtime.extension.api.runtime.config.ConfigurationInstance> |
getExpired() |
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 |
dispose, getConfigurationModel, getExtensionClassLoader, getExtensionModel, getName, initialise, startConfig, stopgetAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DynamicConfigurationProvider(String name, org.mule.runtime.api.meta.model.ExtensionModel extensionModel, org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel, ResolverSet resolverSet, ConnectionProviderValueResolver connectionProviderResolver, org.mule.runtime.extension.api.runtime.ExpirationPolicy expirationPolicy, MuleContext muleContext)
name - this provider's nameextensionModel - the model that owns the configurationModelconfigurationModel - the model for the returned configurationsresolverSet - the ResolverSet that provides the configuration's parameter valuesconnectionProviderResolver - a ValueResolver used to obtain a ConnectionProviderexpirationPolicy - the ExpirationPolicy for the unused instancespublic org.mule.runtime.extension.api.runtime.config.ConfigurationInstance get(org.mule.runtime.api.event.Event event)
resolverSet using the given event and returns an instance produced with the result. For equivalent
ResolverSetResults it will return the same instance.get in interface org.mule.runtime.extension.api.runtime.config.ConfigurationProviderevent - the current eventConfigurationInstanceprotected void registerConfiguration(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance configuration)
LifecycleAwareConfigurationProviderConfigurationInstance so that they're kept
track of and the lifecycle can be propagatedregisterConfiguration in class LifecycleAwareConfigurationProviderconfiguration - a newly created ConfigurationInstancepublic List<org.mule.runtime.extension.api.runtime.config.ConfigurationInstance> getExpired()
getExpired in interface org.mule.runtime.extension.api.runtime.config.ExpirableConfigurationProviderprotected void doInitialise()
LifecycleAwareConfigurationProviderdoInitialise in class LifecycleAwareConfigurationProviderpublic void start()
throws org.mule.runtime.api.exception.MuleException
LifecycleAwareConfigurationProviderStartable.start() phase on the currently provided configurationsstart in interface org.mule.runtime.api.lifecycle.Startablestart in class LifecycleAwareConfigurationProviderorg.mule.runtime.api.exception.MuleException - if an exception is foundCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.