org.springframework.integration.aop
Class MessagePublishingInterceptor

java.lang.Object
  extended by org.springframework.integration.aop.MessagePublishingInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class MessagePublishingInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor

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

Constructor Summary
MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource)
           
 
Method Summary
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 void setChannelResolver(ChannelResolver channelResolver)
           
 void setDefaultChannel(MessageChannel defaultChannel)
           
 void setPublisherMetadataSource(org.springframework.integration.aop.PublisherMetadataSource metadataSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagePublishingInterceptor

public MessagePublishingInterceptor(org.springframework.integration.aop.PublisherMetadataSource metadataSource)
Method Detail

setPublisherMetadataSource

public void setPublisherMetadataSource(org.springframework.integration.aop.PublisherMetadataSource metadataSource)

setDefaultChannel

public void setDefaultChannel(MessageChannel defaultChannel)

setChannelResolver

public void setChannelResolver(ChannelResolver channelResolver)

invoke

public final java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                              throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable