org.springframework.integration.transformer
Class MessageTransformingChannelInterceptor
java.lang.Object
org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
org.springframework.integration.transformer.MessageTransformingChannelInterceptor
- All Implemented Interfaces:
- ChannelInterceptor
public class MessageTransformingChannelInterceptor
- extends ChannelInterceptorAdapter
A ChannelInterceptor which invokes a Transformer
when either sending-to or receiving-from a channel.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageTransformingChannelInterceptor
public MessageTransformingChannelInterceptor(Transformer transformer)
getTransformOnSend
public boolean getTransformOnSend()
setTransformOnSend
public void setTransformOnSend(boolean transformOnSend)
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- Overrides:
preSend in class ChannelInterceptorAdapter
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- Overrides:
postReceive in class ChannelInterceptorAdapter