public class StaticValueResolver<T> extends Object implements ValueResolver<T>
ValueResolver which always returns the same
constant value.| Constructor and Description |
|---|
StaticValueResolver(T value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDynamic()
returns
false if subsequent invocations to
ValueResolver.resolve(MuleEvent) will return the same value. |
T |
resolve(MuleEvent event)
Resolves a value from the given
event |
public StaticValueResolver(T value)
public T resolve(MuleEvent event) throws MuleException
eventresolve in interface ValueResolver<T>event - a MuleEventMuleException - if the resolution of the value failspublic boolean isDynamic()
ValueResolverfalse if subsequent invocations to
ValueResolver.resolve(MuleEvent) 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>Copyright © 2003–2023 MuleSoft, Inc.. All rights reserved.