public class DefaultAggregatorFactory extends Object implements AggregatorFactory
AggregatorFactory.
This AggregatorFactory implementation is used for aggregators that accept a single ValueExtractor argument in the constructor and require no additional configuration.
| Constructor and Description |
|---|
DefaultAggregatorFactory(Class clzAggr)
Construct a DefaultAggregatorFactory instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected InvocableMap.EntryAggregator |
createAggregator(ValueExtractor extractor)
Create and initialize a new aggregator instance.
|
InvocableMap.EntryAggregator |
getAggregator(String... asArgs)
Return an aggregator instantiated by calling an aggregator class constructor.
|
protected Constructor |
getConstructor(Constructor[] aCtors)
Search the given constructors for a constructor that accepts a single
ValueExtractor parameter. |
public DefaultAggregatorFactory(Class clzAggr)
clzAggr - the aggregator classpublic InvocableMap.EntryAggregator getAggregator(String... asArgs)
ValueExtractor parameter exists, it will be invoked with an IdentityExtractor instance.ValueExtractor parameter does not exists, the default constructor is invoked.ValueExtractor parameter exists, it will be invoked with an MVEL-based ValueExtractor implementation.getAggregator in interface AggregatorFactoryasArgs - aggregator configuration argumentsIllegalArgumentException - if an appropriate constructor cannot be foundprotected InvocableMap.EntryAggregator createAggregator(ValueExtractor extractor)
extractor - ValueExtractor to use for a constructor parameterprotected Constructor getConstructor(Constructor[] aCtors)
ValueExtractor parameter. If found, return the constructor; otherwise return the public default constructor, if available.aCtors - constructor array