public final class DynamicConfigurationProvider extends LifecycleAwareConfigurationProvider implements org.mule.runtime.extension.api.runtime.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)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.ConfigurationInstance |
get(Object event)
Evaluates
resolverSet using the given event and returns an instance produced with the result. |
List<org.mule.runtime.extension.api.runtime.ConfigurationInstance> |
getExpired() |
protected void |
registerConfiguration(org.mule.runtime.extension.api.runtime.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 |
dispose, getConfigurationModel, getExtensionClassLoader, getExtensionModel, getName, initialise, start, startConfig, stoppublic 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)
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.ConfigurationInstance get(Object 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.ConfigurationProviderevent - the current eventConfigurationInstanceprotected void registerConfiguration(org.mule.runtime.extension.api.runtime.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.ConfigurationInstance> getExpired()
getExpired in interface org.mule.runtime.extension.api.runtime.ExpirableConfigurationProviderCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.