Class DelegatingMessageGroupProcessor
java.lang.Object
org.springframework.integration.aggregator.DelegatingMessageGroupProcessor
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- Lifecycle,- MessageGroupProcessor,- ManageableLifecycle
public class DelegatingMessageGroupProcessor
extends Object
implements MessageGroupProcessor, BeanFactoryAware, ManageableLifecycle
The 
MessageGroupProcessor implementation with delegation to the provided delegate
 and optional aggregation for headers.
 
 Unlike AbstractAggregatingMessageGroupProcessor this processor checks a result
 of the delegate call and aggregates headers into the output only
 if the result is not a Message or AbstractIntegrationMessageBuilder.
 
 This processor is used internally for wrapping provided non-standard MessageGroupProcessor
 when a aggregate headers Function is provided.
 For POJO method invoking or SpEL expression evaluation it is recommended to use an
 AbstractAggregatingMessageGroupProcessor implementations.
- Since:
- 5.2
- Author:
- Artem Bilan
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingMessageGroupProcessor(MessageGroupProcessor delegate, Function<MessageGroup, Map<String, Object>> headersFunction) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanprocessMessageGroup(MessageGroup group) Process the given MessageGroup.voidsetBeanFactory(BeanFactory beanFactory) voidstart()voidstop()
- 
Constructor Details- 
DelegatingMessageGroupProcessorpublic DelegatingMessageGroupProcessor(MessageGroupProcessor delegate, Function<MessageGroup, Map<String, Object>> headersFunction) 
 
- 
- 
Method Details- 
setBeanFactory- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
- Throws:
- BeansException
 
- 
processMessageGroupDescription copied from interface:MessageGroupProcessorProcess the given MessageGroup. Implementations are free to return as few or as many messages based on the invocation as needed. For example an aggregating processor will return only a single message representing the group, while a resequencing processor will return all messages whose preceding sequence has been satisfied.If a multiple messages are returned the return value must be a Collection<Message>. - Specified by:
- processMessageGroupin interface- MessageGroupProcessor
- Parameters:
- group- The message group.
- Returns:
- The result of processing the group.
 
- 
startpublic void start()- Specified by:
- startin interface- Lifecycle
- Specified by:
- startin interface- ManageableLifecycle
 
- 
stoppublic void stop()- Specified by:
- stopin interface- Lifecycle
- Specified by:
- stopin interface- ManageableLifecycle
 
- 
isRunningpublic boolean isRunning()- Specified by:
- isRunningin interface- Lifecycle
- Specified by:
- isRunningin interface- ManageableLifecycle
 
 
-