Class MethodInvokingMessageGroupProcessor
java.lang.Object
org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
org.springframework.integration.aggregator.MethodInvokingMessageGroupProcessor
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,Lifecycle
,MessageGroupProcessor
,ManageableLifecycle
public class MethodInvokingMessageGroupProcessor
extends AbstractAggregatingMessageGroupProcessor
implements ManageableLifecycle
MessageGroupProcessor that serves as an adapter for the invocation of a POJO method.
- Since:
- 2.0
- Author:
- Iwein Fuld, Mark Fisher, Dave Syer, Gary Russell, Artme Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
logger
-
Constructor Summary
ConstructorDescriptionCreates a wrapper around the object passed in.MethodInvokingMessageGroupProcessor
(Object target, Method method) Creates a wrapper around the object passed in.MethodInvokingMessageGroupProcessor
(Object target, String methodName) Creates a wrapper around the object passed in. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
aggregatePayloads
(MessageGroup group, Map<String, Object> headers) boolean
void
setBeanFactory
(BeanFactory beanFactory) void
setConversionService
(ConversionService conversionService) void
start()
void
stop()
Methods inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
aggregateHeaders, getHeadersFunction, getMessageBuilderFactory, processMessageGroup, setHeadersFunction
-
Constructor Details
-
MethodInvokingMessageGroupProcessor
Creates a wrapper around the object passed in. This constructor will look for a method that can process a list of messages.- Parameters:
target
- the object to wrap
-
MethodInvokingMessageGroupProcessor
Creates a wrapper around the object passed in. This constructor will look for a named method specifically and fail when it cannot find a method with the given name.- Parameters:
target
- the object to wrapmethodName
- the name of the method to invoke
-
MethodInvokingMessageGroupProcessor
Creates a wrapper around the object passed in.- Parameters:
target
- the object to wrapmethod
- the method to invoke
-
-
Method Details
-
setConversionService
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Overrides:
setBeanFactory
in classAbstractAggregatingMessageGroupProcessor
-
aggregatePayloads
- Specified by:
aggregatePayloads
in classAbstractAggregatingMessageGroupProcessor
-
start
public void start()- Specified by:
start
in interfaceLifecycle
- Specified by:
start
in interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceLifecycle
- Specified by:
stop
in interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceLifecycle
- Specified by:
isRunning
in interfaceManageableLifecycle
-