@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
/** * Populate the {@link MessageProducerSupport} object to the {@link IntegrationFlowBuilder} chain * using the fluent API from the {@link MessageProducerSpec}. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. * @param messageProducerSpec the {@link MessageProducerSpec} to use. * @return new {@link IntegrationFlowBuilder}. * @see MessageProducerSpec */ public static IntegrationFlowBuilder from(MessageProducerSpec<?, ?> messageProducerSpec) { return from(messageProducerSpec.get(), registerComponents(messageProducerSpec)); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("replies")) .channel(replies()) .get(); }
/** * Populate the {@link MessagingGatewaySupport} object to the {@link IntegrationFlowBuilder} chain * using the fluent API from the {@link MessagingGatewaySpec}. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessagingGateway}. * @param inboundGatewaySpec the {@link MessagingGatewaySpec} to use. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(MessagingGatewaySpec<?, ?> inboundGatewaySpec) { return from(inboundGatewaySpec.get(), registerComponents(inboundGatewaySpec)); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(replies()) .handle(Jms.outboundAdapter(connectionFactory).destination("replies")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("replies")) .channel(replies()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(replies()) .handle(Jms.outboundAdapter(connectionFactory).destination("replies")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
/** * Create an {@link IntegrationFlow} with a {@link ChunkProcessorChunkHandler} * configured as a service activator listening to the input channel and replying * on the output channel. * * @return the integration flow */ @SuppressWarnings({"unchecked", "rawtypes"}) public IntegrationFlow build() { Assert.notNull(this.itemWriter, "An ItemWriter must be provided"); Assert.notNull(this.inputChannel, "An InputChannel must be provided"); Assert.notNull(this.outputChannel, "An OutputChannel must be provided"); if(this.itemProcessor == null) { this.itemProcessor = new PassThroughItemProcessor(); } SimpleChunkProcessor<I, O> chunkProcessor = new SimpleChunkProcessor<>(this.itemProcessor, this.itemWriter); ChunkProcessorChunkHandler<I> chunkProcessorChunkHandler = new ChunkProcessorChunkHandler<>(); chunkProcessorChunkHandler.setChunkProcessor(chunkProcessor); return IntegrationFlows .from(this.inputChannel) .handle(chunkProcessorChunkHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel) .get(); }
.from(this.inputChannel) .handle(stepExecutionRequestHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel)
/** * Populate the provided {@link MessagingGatewaySupport} object to the {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. * @param inboundGateway the {@link MessagingGatewaySupport} to populate. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(MessagingGatewaySupport inboundGateway) { return from(inboundGateway, (IntegrationFlowBuilder) null); }
/** * Populate the provided {@link MethodInvokingMessageSource} for the method of the provided service. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. * @param service the service to use. * @param methodName the method to invoke. * @return new {@link IntegrationFlowBuilder}. * @since 1.1 * @see MethodInvokingMessageSource */ public static IntegrationFlowBuilder from(Object service, String methodName) { return from(service, methodName, null); }
/** * Provides {@link Supplier} as source of messages to the integration flow which will * be triggered by the application context's default poller (which must be declared). * @param messageSource the {@link Supplier} to populate. * @param <T> the supplier type. * @return new {@link IntegrationFlowBuilder}. * @see Supplier */ public static <T> IntegrationFlowBuilder from(Supplier<T> messageSource) { return from(messageSource, "get", null); }
/** * Populate the provided {@link MessageSource} object to the {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. * @param messageSource the {@link MessageSource} to populate. * @return new {@link IntegrationFlowBuilder}. * @see MessageSource */ public static IntegrationFlowBuilder from(MessageSource<?> messageSource) { return from(messageSource, (Consumer<SourcePollingChannelAdapterSpec>) null); }
/** * Populate the provided {@link MessageProducerSupport} object to the {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. * @param messageProducer the {@link MessageProducerSupport} to populate. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(MessageProducerSupport messageProducer) { return from(messageProducer, (IntegrationFlowBuilder) null); }
partitionHandler.setReplyChannel(replies); StandardIntegrationFlow standardIntegrationFlow = IntegrationFlows .from(this.inputChannel) .aggregate(aggregatorSpec -> aggregatorSpec.processor(partitionHandler)) .channel(replies)