Spring Integration

org.springframework.integration.channel.interceptor
Class ChannelInterceptorAdapter

java.lang.Object
  extended by org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
All Implemented Interfaces:
ChannelInterceptor
Direct Known Subclasses:
MessageSelectingInterceptor, MessageTransformingChannelInterceptor, WireTap

public class ChannelInterceptorAdapter
extends Object
implements ChannelInterceptor

A ChannelInterceptor with no-op method implementations so that subclasses do not have to implement all of the interface's methods.

Author:
Mark Fisher

Constructor Summary
ChannelInterceptorAdapter()
           
 
Method Summary
 Message<?> postReceive(Message<?> message, MessageChannel channel)
          Invoked immediately after a Message has been retrieved but before it is returned to the caller.
 void postSend(Message<?> message, MessageChannel channel, boolean sent)
          Invoked immediately after the send invocation.
 boolean preReceive(MessageChannel channel)
          Invoked as soon as receive is called and before a Message is actually retrieved.
 Message<?> preSend(Message<?> message, MessageChannel channel)
          Invoked before the Message is actually sent to the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelInterceptorAdapter

public ChannelInterceptorAdapter()
Method Detail

preSend

public Message<?> preSend(Message<?> message,
                          MessageChannel channel)
Description copied from interface: ChannelInterceptor
Invoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary. If this method returns null, then the actual send invocation will not occur.

Specified by:
preSend in interface ChannelInterceptor

postSend

public void postSend(Message<?> message,
                     MessageChannel channel,
                     boolean sent)
Description copied from interface: ChannelInterceptor
Invoked immediately after the send invocation. The boolean value argument represents the return value of that invocation.

Specified by:
postSend in interface ChannelInterceptor

preReceive

public boolean preReceive(MessageChannel channel)
Description copied from interface: ChannelInterceptor
Invoked as soon as receive is called and before a Message is actually retrieved. If the return value is 'false', then no Message will be retrieved. This only applies to PollableChannels.

Specified by:
preReceive in interface ChannelInterceptor

postReceive

public Message<?> postReceive(Message<?> message,
                              MessageChannel channel)
Description copied from interface: ChannelInterceptor
Invoked immediately after a Message has been retrieved but before it is returned to the caller. The Message may be modified if necessary. This only applies to PollableChannels.

Specified by:
postReceive in interface ChannelInterceptor

Spring Integration

Copyright © 2010. All Rights Reserved.