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.| Constructor and Description |
|---|
RegistryLookupValueResolver(String key)
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(ValueResolvingContext) will return the same value. |
T |
resolve(ValueResolvingContext context)
Returns the registry value associated with
key |
void |
setRegistry(org.mule.runtime.api.artifact.Registry registry) |
public T resolve(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
keyresolve in interface ValueResolver<T>context - a ValueResolvingContextkeyorg.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(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>false@Inject public void setRegistry(org.mule.runtime.api.artifact.Registry registry)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.