Class MethodInvokingMessageGroupProcessor
java.lang.Object
org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
org.springframework.integration.aggregator.MethodInvokingMessageGroupProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.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
-
Field Summary
Fields inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
logger -
Constructor Summary
Constructors Constructor Description MethodInvokingMessageGroupProcessor(java.lang.Object target)Creates a wrapper around the object passed in.MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.reflect.Method method)Creates a wrapper around the object passed in.MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.String methodName)Creates a wrapper around the object passed in. -
Method Summary
Modifier and Type Method Description protected java.lang.ObjectaggregatePayloads(MessageGroup group, java.util.Map<java.lang.String,java.lang.Object> headers)booleanisRunning()voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetConversionService(org.springframework.core.convert.ConversionService conversionService)voidstart()voidstop()Methods inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
aggregateHeaders, getHeadersFunction, getMessageBuilderFactory, processMessageGroup, setHeadersFunction
-
Constructor Details
-
MethodInvokingMessageGroupProcessor
public MethodInvokingMessageGroupProcessor(java.lang.Object target)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
public MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.String methodName)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
public MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.reflect.Method method)Creates a wrapper around the object passed in.- Parameters:
target- the object to wrapmethod- the method to invoke
-
-
Method Details
-
setConversionService
public void setConversionService(org.springframework.core.convert.ConversionService conversionService) -
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Overrides:
setBeanFactoryin classAbstractAggregatingMessageGroupProcessor
-
aggregatePayloads
protected final java.lang.Object aggregatePayloads(MessageGroup group, java.util.Map<java.lang.String,java.lang.Object> headers)- Specified by:
aggregatePayloadsin classAbstractAggregatingMessageGroupProcessor
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Specified by:
startin interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Specified by:
stopin interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle- Specified by:
isRunningin interfaceManageableLifecycle
-