Class MessagePublishingInterceptor
java.lang.Object
org.springframework.integration.aop.MessagePublishingInterceptor
- All Implemented Interfaces:
- Advice,- Interceptor,- MethodInterceptor,- Aware,- BeanFactoryAware
public class MessagePublishingInterceptor
extends Object
implements MethodInterceptor, BeanFactoryAware
A 
MethodInterceptor that publishes Messages to a channel. The
 payload of the published Message can be derived from arguments or any return
 value or exception resulting from the method invocation. That mapping is the
 responsibility of the EL expression provided by the PublisherMetadataSource.- Since:
- 2.0
- Author:
- Mark Fisher, Artem Bilan, Gary Russell
- 
Constructor SummaryConstructorsConstructorDescriptionMessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected MessageBuilderFactoryfinal Objectinvoke(MethodInvocation invocation) voidsetBeanFactory(BeanFactory beanFactory) voidsetChannelResolver(DestinationResolver<MessageChannel> channelResolver) voidsetDefaultChannelName(String defaultChannelName) 
- 
Constructor Details- 
MessagePublishingInterceptorpublic MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource) 
 
- 
- 
Method Details- 
setDefaultChannelName- Parameters:
- defaultChannelName- the default channel name.
- Since:
- 4.0.3
 
- 
setChannelResolver
- 
setBeanFactory- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
- Throws:
- BeansException
 
- 
getMessageBuilderFactory
- 
invoke- Specified by:
- invokein interface- MethodInterceptor
- Throws:
- Throwable
 
 
-