public final class DynamicConfigurationInstanceProvider<T> extends Object implements org.mule.extension.runtime.ConfigurationInstanceProvider<T>
ConfigurationInstanceProvider
which continuously evaluates the same
ResolverSet
and then uses the resulting ResolverSetResult
to build an instance of a given type.
Although each invocation to get(OperationContext)
is guaranteed to end up in an invocation
to #resolverSet#resolve(MuleEvent)
, 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.Constructor and Description |
---|
DynamicConfigurationInstanceProvider(ConfigurationObjectBuilder configurationObjectBuilder,
ResolverSet resolverSet)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
T |
get(org.mule.extension.runtime.OperationContext operationContext)
Evaluates
resolverSet using the given event and returns
an instance produced with the result. |
public DynamicConfigurationInstanceProvider(ConfigurationObjectBuilder configurationObjectBuilder, ResolverSet resolverSet)
configurationObjectBuilder
- the ConfigurationObjectBuilder
that will build the configuration instancesresolverSet
- the ResolverSet
that's going to be evaluatedpublic T get(org.mule.extension.runtime.OperationContext operationContext)
resolverSet
using the given event
and returns
an instance produced with the result. For equivalent ResolverSetResult
s
it will return the same instance.get
in interface org.mule.extension.runtime.ConfigurationInstanceProvider<T>
operationContext
- a OperationContext
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.