List of usage examples for org.springframework.integration.channel.interceptor GlobalChannelInterceptorWrapper getOrder
@Override public final int getOrder()
From source file:org.springframework.integration.channel.interceptor.GlobalChannelInterceptorBeanPostProcessor.java
public void afterPropertiesSet() throws Exception { for (GlobalChannelInterceptorWrapper channelInterceptor : this.channelInterceptors) { if (channelInterceptor.getOrder() >= 0) { this.positiveOrderInterceptors.add(channelInterceptor); } else {/*from w ww . j a va 2 s. c o m*/ this.negativeOrderInterceptors.add(channelInterceptor); } } }
From source file:org.springframework.integration.config.GlobalChannelInterceptorProcessor.java
@Override public void afterSingletonsInstantiated() { Collection<GlobalChannelInterceptorWrapper> interceptors = this.beanFactory .getBeansOfType(GlobalChannelInterceptorWrapper.class).values(); if (CollectionUtils.isEmpty(interceptors)) { logger.debug("No global channel interceptors."); } else {//from ww w . j a va2 s .c o m for (GlobalChannelInterceptorWrapper channelInterceptor : interceptors) { if (channelInterceptor.getOrder() >= 0) { this.positiveOrderInterceptors.add(channelInterceptor); } else { this.negativeOrderInterceptors.add(channelInterceptor); } } Map<String, ChannelInterceptorAware> channels = this.beanFactory .getBeansOfType(ChannelInterceptorAware.class); for (Entry<String, ChannelInterceptorAware> entry : channels.entrySet()) { addMatchingInterceptors(entry.getValue(), entry.getKey()); } } }