public class RegistryLookupValueResolver<T> extends Object implements ValueResolver<T>
ValueResolver which accesses the mule registry and returns the value associated with key.
Although the registry is mutable, isDynamic() will always return false since the value associated to a given
key is not meant to change.
The registry is accessed through the MuleContext that is exposed in the Event that is passed to the
resolve(Event) method| Constructor and Description |
|---|
RegistryLookupValueResolver(String key,
MuleContext muleContext)
Construct a new instance and set the
key that will be used to access the registry |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDynamic()
returns
false if subsequent invocations to ValueResolver.resolve(Event) will return the same value. |
T |
resolve(Event event)
Returns the registry value associated with
key |
public RegistryLookupValueResolver(String key, MuleContext muleContext)
key that will be used to access the registrykey - a not blank StringmuleContext - the Mule nodepublic T resolve(Event event) throws org.mule.runtime.api.exception.MuleException
keyresolve in interface ValueResolver<T>event - a Eventkeyorg.mule.runtime.api.exception.MuleException - if an error occurred fetching the valueConfigurationException - if no object is registered under keypublic boolean isDynamic()
ValueResolverfalse if subsequent invocations to ValueResolver.resolve(Event) 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>falseCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.