T - the generic type of the produced values.public final class ConfigOverrideValueResolverWrapper<T> extends Object implements ValueResolver<T>, org.mule.runtime.api.lifecycle.Initialisable
ValueResolver wrapper which defaults to obtaining the value from the current ConfigurationInstance
if the given delegate results in a null value.| Modifier and Type | Method and Description |
|---|---|
void |
initialise() |
boolean |
isDynamic()
Returns
false if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value. |
static <T> ValueResolver<T> |
of(ValueResolver<T> delegate,
String parameterName,
MuleContext muleContext)
Creates a new instance
|
T |
resolve(ValueResolvingContext context)
Resolves a value from the given
event |
public static <T> ValueResolver<T> of(ValueResolver<T> delegate, String parameterName, MuleContext muleContext)
T - the generic type of the produced values.delegate - the delegate used to obtain a value in the first place.
Only if this delegate returns a null value will the resolution using
a config will be attempted.ConfigOverrideValueResolverWrapperpublic T resolve(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
ValueResolvereventresolve in interface ValueResolver<T>context - the context for the current resolution attemptorg.mule.runtime.api.exception.MuleException - if the resolution of the value failspublic boolean isDynamic()
ValueResolverfalse if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value.
Notice that if it returns true, then it might return different values per invocation but that's not guaranteed.isDynamic in interface ValueResolver<T>public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.