List of usage examples for org.springframework.integration.channel PublishSubscribeChannel setInterceptors
@Override public void setInterceptors(List<ChannelInterceptor> interceptors)
From source file:com.nayidisha.slowglow.config.SpringMessagingConfig.java
/** * This channel can be used to monitor messages from our main channel * without interrupting it.//from w ww . j a va2s . co m * * @return */ @Bean(name = "monitoringChannel") public PublishSubscribeChannel monitoringChannel() { PublishSubscribeChannel channel = new PublishSubscribeChannel(); List<ChannelInterceptor> list = new ArrayList<>(1); list.add(wireTap()); channel.setInterceptors(list); return channel; }
From source file:com.nayidisha.slowglow.config.SpringMessagingConfig.java
/** * SubscribableChannel for Axon CQRS to use * /* w ww . ja v a 2 s .co m*/ * @return */ @Bean(name = "webSocketInputChannel") public PublishSubscribeChannel webSocketInputChannel() { PublishSubscribeChannel channel = new PublishSubscribeChannel(); List<ChannelInterceptor> list = new ArrayList<>(1); list.add(messageSelectingInterceptor()); channel.setInterceptors(list); // channel.setDatatypes(Object.class); // we've defined it using the PayloadTypeSelector instead and injected it as an interceptor above return channel; }