org.axonframework.correlation
Class MultiCorrelationDataProvider<T extends Message>

java.lang.Object
  extended by org.axonframework.correlation.MultiCorrelationDataProvider<T>
Type Parameters:
T - The type of message this correlation handler can handle
All Implemented Interfaces:
CorrelationDataProvider<T>

public class MultiCorrelationDataProvider<T extends Message>
extends Object
implements CorrelationDataProvider<T>

CorrelationDataProvider that combines the data of multiple other correlation providers. When multiple instance provide the same keys, a delegate will override the entries provided by previously resolved delegates.

Since:
2.3
Author:
Allard Buijze

Constructor Summary
MultiCorrelationDataProvider(List<? extends CorrelationDataProvider<? super T>> correlationDataProviders)
          Initialize the correlation data provider, delegating to given correlationDataProviders.
 
Method Summary
 Map<String,?> correlationDataFor(T message)
          Provides a map with the entries to attach as correlation data to generated messages while processing given message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiCorrelationDataProvider

public MultiCorrelationDataProvider(List<? extends CorrelationDataProvider<? super T>> correlationDataProviders)
Initialize the correlation data provider, delegating to given correlationDataProviders.

Parameters:
correlationDataProviders - the providers to delegate to.
Method Detail

correlationDataFor

public Map<String,?> correlationDataFor(T message)
Description copied from interface: CorrelationDataProvider
Provides a map with the entries to attach as correlation data to generated messages while processing given message.

This method should not return null.

Specified by:
correlationDataFor in interface CorrelationDataProvider<T extends Message>
Parameters:
message - The message to define correlation data for
Returns:
the data to attach as correlation data to generated messages


Copyright © 2010-2016. All Rights Reserved.