ru.yandex.qatools.camelot.common.PluginMethodAggregationKeyStrategy Maven / Gradle / Ivy
package ru.yandex.qatools.camelot.common;
import org.apache.camel.Exchange;
import ru.yandex.qatools.camelot.api.Constants;
import ru.yandex.qatools.camelot.api.annotations.AggregationKey;
import ru.yandex.qatools.camelot.config.PluginContext;
/**
* @author Ilya Sadykov (mailto: [email protected])
*/
public class PluginMethodAggregationKeyStrategy extends AbstractPluginMethodStrategy implements AggregationKeyStrategy {
public PluginMethodAggregationKeyStrategy(PluginContext pluginContext) {
super(pluginContext, AggregationKey.class);
}
@Override
public String aggregationKey(Exchange exchange) {
return (String) dispatchEvent(exchange);
}
@Override
protected Object defaultReturn() {
return Constants.Keys.ALL;
}
}