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 Summary
Constructors Constructor Description MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource) -
Method Summary
Modifier and Type Method Description protected MessageBuilderFactorygetMessageBuilderFactory()Objectinvoke(MethodInvocation invocation)voidsetBeanFactory(BeanFactory beanFactory)voidsetChannelResolver(DestinationResolver<MessageChannel> channelResolver)voidsetDefaultChannelName(String defaultChannelName)
-
Constructor Details
-
MessagePublishingInterceptor
public 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 interfaceBeanFactoryAware- Throws:
BeansException
-
getMessageBuilderFactory
-
invoke
- Specified by:
invokein interfaceMethodInterceptor- Throws:
Throwable
-