public class MessagePublishingInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.BeanFactoryAware
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.| Constructor and Description |
|---|
MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setChannelResolver(ChannelResolver channelResolver) |
void |
setDefaultChannel(MessageChannel defaultChannel) |
void |
setPublisherMetadataSource(org.springframework.integration.aop.PublisherMetadataSource metadataSource) |
public MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource)
public void setPublisherMetadataSource(org.springframework.integration.aop.PublisherMetadataSource metadataSource)
public void setDefaultChannel(MessageChannel defaultChannel)
public void setChannelResolver(ChannelResolver channelResolver)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic final java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorjava.lang.Throwable