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
ConstructorsConstructorDescriptionCreates 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 ObjectaggregatePayloads(MessageGroup group, Map<String, Object> headers) booleanvoidsetBeanFactory(BeanFactory beanFactory) voidsetConversionService(ConversionService conversionService) voidstart()voidstop()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:
setBeanFactoryin interfaceBeanFactoryAware- Overrides:
setBeanFactoryin classAbstractAggregatingMessageGroupProcessor
-
aggregatePayloads
- Specified by:
aggregatePayloadsin classAbstractAggregatingMessageGroupProcessor
-
start
public void start()- Specified by:
startin interfaceLifecycle- Specified by:
startin interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stopin interfaceLifecycle- Specified by:
stopin interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceLifecycle- Specified by:
isRunningin interfaceManageableLifecycle
-