@Bean @ServiceActivator(inputChannel = "scatterAuctionWithoutGatherChannel") public MessageHandler auctionWithoutGatherChannelBridge2() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
@Override protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) { BridgeHandler handler = new BridgeHandler(); String outputChannelName = resolveTargetBeanName(method); handler.setOutputChannelName(outputChannelName); 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 = "publishSubscribeChannel") public MessageHandler securedChannelQueueBridge() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(securedChannelQueue()); handler.setOrder(1); return handler; }
/** * Populate a {@link BridgeHandler} to the current integration flow position. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .bridge(s -> s.poller(Pollers.fixedDelay(100)) * .autoStartup(false) * .id("priorityChannelBridge")) * } * </pre> * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see GenericEndpointSpec */ public B bridge(Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer) { return register(new GenericEndpointSpec<>(new BridgeHandler()), endpointConfigurer); }
BridgeHandler handler = new BridgeHandler(); if (getBeanFactory() != null) { handler.setBeanFactory(getBeanFactory()); handler.afterPropertiesSet(); if (replyChan instanceof SubscribableChannel) { correlator = new EventDrivenConsumer((SubscribableChannel) replyChan, handler);
BridgeHandler handler = new BridgeHandler(); handler.setBeanFactory(this.context.getBeanFactory()); handler.setOutputChannel(inputChannel); handler.afterPropertiesSet(); ConsumerEndpointFactoryBean bridgeFactoryBean = new ConsumerEndpointFactoryBean(); bridgeFactoryBean.setInputChannel(previousOutputChannel);
@Override public Closeable adapt(MessageChannel streamListenerResult, MessageChannel bindingTarget) { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(bindingTarget); handler.afterPropertiesSet(); ((SubscribableChannel) streamListenerResult).subscribe(handler); return new NoOpCloseeable(); }
handler.setBeanFactory(getBeanFactory()); handler.setOutputChannel(to); handler.setBeanName(bridgeName); handler.afterPropertiesSet(); cefb.getObject().setComponentName(handler.getComponentName()); Binding binding = isInbound ? Binding.forConsumer(name, cefb.getObject(), to, properties) : Binding.forProducer(name, from, cefb.getObject(), properties);
IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(producer); BridgeHandler bridgeHandler = new BridgeHandler(); bridgeHandler.setBeanName("bridge");
@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)); }
@Bean @ServiceActivator(inputChannel = "autoCreateChannel") public MessageHandler autoCreateServiceActivator() { return new BridgeHandler(); }
BridgeHandler handler = new BridgeHandler(); if (getBeanFactory() != null) { handler.setBeanFactory(getBeanFactory()); handler.afterPropertiesSet(); if (replyChan instanceof SubscribableChannel) { correlator = new EventDrivenConsumer((SubscribableChannel) replyChan, handler);
@Bean @ServiceActivator(inputChannel = "publishSubscribeChannel") public MessageHandler securedChannelQueue2Bridge() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(securedChannelQueue2()); handler.setOrder(2); return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithoutGatherChannel") public MessageHandler auctionWithoutGatherChannelBridge3() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel1()); return handler; }
BridgeHandler bridgeHandler = new BridgeHandler(); boolean registerSubflowBridge = false;
@Override protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) { BridgeHandler handler = new BridgeHandler(); String outputChannelName = MessagingAnnotationUtils.resolveAttribute(annotations, "value", String.class); if (StringUtils.hasText(outputChannelName)) { handler.setOutputChannelName(outputChannelName); } return handler; }
@Bean @ServiceActivator(inputChannel = "scatterAuctionWithGatherChannel") public MessageHandler auctionWithGatherChannelBridge1() { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(serviceChannel2()); return handler; }
/** * Populate a {@link BridgeHandler} to the current integration flow position. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .bridge(s -> s.poller(Pollers.fixedDelay(100)) * .autoStartup(false) * .id("priorityChannelBridge")) * } * </pre> * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. * @see GenericEndpointSpec */ public B bridge(Consumer<GenericEndpointSpec<BridgeHandler>> endpointConfigurer) { return register(new GenericEndpointSpec<>(new BridgeHandler()), endpointConfigurer); }
@Override protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) { BridgeHandler handler = new BridgeHandler(); String outputChannelName = resolveTargetBeanName(method); handler.setOutputChannelName(outputChannelName); return handler; }