public final class DynamicConfigurationProvider extends LifecycleAwareConfigurationProvider implements org.mule.runtime.extension.api.runtime.config.ExpirableConfigurationProvider, org.mule.runtime.extension.api.values.ConfigurationParameterValueProvider
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(Event) 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, muleContextANNOTATION_NAME, LOCATION_KEY, ROOT_CONTAINER_NAME_KEY| Constructor and Description |
|---|
DynamicConfigurationProvider(String name,
org.mule.runtime.api.meta.model.ExtensionModel extension,
org.mule.runtime.api.meta.model.config.ConfigurationModel config,
ResolverSet resolverSet,
ConnectionProviderValueResolver connectionProviderResolver,
org.mule.runtime.extension.api.runtime.ExpirationPolicy expirationPolicy,
ReflectionCache reflectionCache,
ExpressionManager expressionManager,
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. |
Set<org.mule.runtime.api.value.Value> |
getConfigValues(String parameterName) |
Set<org.mule.runtime.api.value.Value> |
getConfigValues(String parameterName,
String targetSelector) |
Set<org.mule.runtime.api.value.Value> |
getConnectionValues(String parameterName) |
Set<org.mule.runtime.api.value.Value> |
getConnectionValues(String parameterName,
String targetSelector) |
List<org.mule.runtime.extension.api.runtime.config.ConfigurationInstance> |
getExpired() |
boolean |
isDynamic() |
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, stop, unRegisterConfigurationgetAnnotation, getAnnotations, getDslSource, getIdentifier, getLocation, getRepresentation, getRootContainerLocation, initRootContainerName, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationModel, getExtensionModel, getNamepublic DynamicConfigurationProvider(String name, org.mule.runtime.api.meta.model.ExtensionModel extension, org.mule.runtime.api.meta.model.config.ConfigurationModel config, ResolverSet resolverSet, ConnectionProviderValueResolver connectionProviderResolver, org.mule.runtime.extension.api.runtime.ExpirationPolicy expirationPolicy, ReflectionCache reflectionCache, ExpressionManager expressionManager, MuleContext muleContext)
name - this provider's nameextension - the model that owns the configurationModelconfig - 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 instancesreflectionCache - the ReflectionCache used to improve reflection lookups performanceexpressionManager - the ExpressionManager used to create a session used to evaluate the attributes.muleContext - the MuleContext that will own the configuration 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 foundpublic boolean isDynamic()
isDynamic in interface org.mule.runtime.extension.api.runtime.config.ConfigurationProviderfalsepublic Set<org.mule.runtime.api.value.Value> getConfigValues(String parameterName) throws org.mule.runtime.extension.api.values.ValueResolvingException
getConfigValues in interface org.mule.runtime.extension.api.values.ConfigurationParameterValueProviderorg.mule.runtime.extension.api.values.ValueResolvingExceptionpublic Set<org.mule.runtime.api.value.Value> getConfigValues(String parameterName, String targetSelector) throws org.mule.runtime.extension.api.values.ValueResolvingException
getConfigValues in interface org.mule.runtime.extension.api.values.ConfigurationParameterValueProviderorg.mule.runtime.extension.api.values.ValueResolvingExceptionpublic Set<org.mule.runtime.api.value.Value> getConnectionValues(String parameterName) throws org.mule.runtime.extension.api.values.ValueResolvingException
getConnectionValues in interface org.mule.runtime.extension.api.values.ConfigurationParameterValueProviderorg.mule.runtime.extension.api.values.ValueResolvingExceptionpublic Set<org.mule.runtime.api.value.Value> getConnectionValues(String parameterName, String targetSelector) throws org.mule.runtime.extension.api.values.ValueResolvingException
getConnectionValues in interface org.mule.runtime.extension.api.values.ConfigurationParameterValueProviderorg.mule.runtime.extension.api.values.ValueResolvingExceptionCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.