T
- the generic type for the instances built.public class ObjectBuilderValueResolver<T> extends Object implements ValueResolver<T>
ValueResolver
which wraps an ObjectBuilder
and calls ObjectBuilder.build(MuleEvent)
on each
resolve(MuleEvent)
.
It implements Lifecycle
and propagates all lifecycle events to
the underlying builder
Constructor and Description |
---|
ObjectBuilderValueResolver(ObjectBuilder<T> builder) |
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)
Delegates to
builder |
public ObjectBuilderValueResolver(ObjectBuilder<T> builder)
public T resolve(MuleEvent event) throws MuleException
builder
resolve
in interface ValueResolver<T>
event
- a MuleEvent
builder
's output objectMuleException
public boolean isDynamic()
ValueResolver
false
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>
true
if builder
is dynamicCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.