Spring Integration

org.springframework.integration.channel.interceptor
Class GlobalChannelInterceptorWrapper

java.lang.Object
  extended by org.springframework.integration.channel.interceptor.GlobalChannelInterceptorWrapper
All Implemented Interfaces:
Ordered, ChannelInterceptor

public class GlobalChannelInterceptorWrapper
extends Object
implements ChannelInterceptor, Ordered

Since:
2.0
Author:
Oleg Zhurakousky

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
GlobalChannelInterceptorWrapper(ChannelInterceptor channelInterceptor)
           
 
Method Summary
 ChannelInterceptor getChannelInterceptor()
           
 int getOrder()
           
 String[] getPatterns()
           
 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.
 void setOrder(int order)
           
 void setPatterns(String[] patterns)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalChannelInterceptorWrapper

public GlobalChannelInterceptorWrapper(ChannelInterceptor channelInterceptor)
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)
Parameters:
order -

getChannelInterceptor

public ChannelInterceptor getChannelInterceptor()

getPatterns

public String[] getPatterns()

setPatterns

public void setPatterns(String[] patterns)

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

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

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

toString

public String toString()
Overrides:
toString in class Object

Spring Integration

Copyright © 2010. All Rights Reserved.