T - the generic type for the items of the returned Collectionpublic final class CollectionValueResolver<T> extends Object implements ValueResolver<Collection<T>>
ValueResolver that takes a list of ValueResolvers and upon invocation of resolve(Event) it return a
Collection of values with the outcome of each original resolver.
This class implements Lifecycle and propagates those events to each of the resolvers| Constructor and Description |
|---|
CollectionValueResolver(Class<? extends Collection> collectionType,
List<ValueResolver<T>> resolvers)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDynamic()
returns
false if subsequent invocations to ValueResolver.resolve(Event) will return the same value. |
static <T> CollectionValueResolver<T> |
of(Class<? extends Collection> collectionType,
List<ValueResolver<T>> resolvers) |
Collection<T> |
resolve(Event event)
Passes the given
event to each resolvers and outputs a collection of type collectionType with each result |
public CollectionValueResolver(Class<? extends Collection> collectionType, List<ValueResolver<T>> resolvers)
collectionType - the Class for a concrete Collection type with a default constructorresolvers - a not null List of resolverspublic static <T> CollectionValueResolver<T> of(Class<? extends Collection> collectionType, List<ValueResolver<T>> resolvers)
public Collection<T> resolve(Event event) throws org.mule.runtime.api.exception.MuleException
event to each resolvers and outputs a collection of type collectionType with each resultresolve in interface ValueResolver<Collection<T>>event - a Event the event to evaluateCollection of type collectionTypeorg.mule.runtime.api.exception.MuleExceptionpublic 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<Collection<T>>true if at least one of the resolvers are dynamicCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.