@Bean @ServiceActivator(inputChannel = "scatterAuctionWithGatherChannel") public MessageHandler auctionWithGatherChannelBridge2() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel2()); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithoutGatherChannel") public MessageHandler auctionWithoutGatherChannelBridge2() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithoutGatherChannel") public MessageHandler auctionWithoutGatherChannelBridge3() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithGatherChannel") public MessageHandler auctionWithGatherChannelBridge1() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel2()); return handler; }
@Bean public BridgeHandler bridgeTarget() { // separate bean so setters and aPS are called BridgeHandler bridgeHandler = new BridgeHandler(); bridgeHandler.setOutputChannel(out()); bridgeHandler.setShouldTrack(true); return bridgeHandler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithoutGatherChannel") public MessageHandler auctionWithoutGatherChannelBridge1() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "distributionChannel2") public MessageHandler distributionBridge2() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithGatherChannel") public MessageHandler auctionWithGatherChannelBridge3() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel2()); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithGatherChannel") public MessageHandler auctionWithGatherChannelBridge4() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel2()); return handler; }
@Bean @ServiceActivator(inputChannel = "distributionChannel1") public MessageHandler distributionBridge1() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "distributionChannel3") public MessageHandler distributionBridge3() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Bean @ServiceActivator(inputChannel = "publishSubscribeChannel") public MessageHandler securedChannelQueue2Bridge() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(securedChannelQueue2()); handler.setOrder(2); return handler; }
@Bean @ServiceActivator(inputChannel = "publishSubscribeChannel") public MessageHandler securedChannelQueueBridge() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(securedChannelQueue()); handler.setOrder(1); return handler; }
@Test public void simpleBridge() { QueueChannel outputChannel = new QueueChannel(); handler.setOutputChannel(outputChannel); Message<?> request = new GenericMessage<String>("test"); handler.handleMessage(request); Message<?> reply = outputChannel.receive(0); assertNotNull(reply); assertThat(reply, sameExceptImmutableHeaders(request)); }
@Override public Closeable adapt(MessageChannel streamListenerResult, MessageChannel bindingTarget) { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(bindingTarget); handler.afterPropertiesSet(); ((SubscribableChannel) streamListenerResult).subscribe(handler); return new NoOpCloseeable(); }
BridgeHandler handler = new BridgeHandler(); handler.setBeanFactory(this.context.getBeanFactory()); handler.setOutputChannel(inputChannel); handler.afterPropertiesSet(); ConsumerEndpointFactoryBean bridgeFactoryBean = new ConsumerEndpointFactoryBean();
handler.setOutputChannel(to); handler.setBeanName(bridgeName); handler.afterPropertiesSet();
errorBridge.setOutputChannel(defaultErrorChannel); errorChannel.subscribe(errorBridge); String errorBridgeHandlerName = getErrorBridgeName(destination);
if (this.isSubscribable(errorChannel)) { BridgeHandler errorBridge = new BridgeHandler(); errorBridge.setOutputChannel(defaultErrorChannel); errorChannel.subscribe(errorBridge); String errorBridgeHandlerName = getErrorBridgeName(destination, group, consumerProperties);