@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("replies")) .channel(replies()) .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(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(); }
.handle(stepExecutionRequestHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel) .get(); IntegrationFlowContext integrationFlowContext = this.beanFactory.getBean(IntegrationFlowContext.class); integrationFlowContext.registration(standardIntegrationFlow)
.aggregate(aggregatorSpec -> aggregatorSpec.processor(partitionHandler)) .channel(replies) .get(); IntegrationFlowContext integrationFlowContext = this.beanFactory.getBean(IntegrationFlowContext.class); integrationFlowContext.registration(standardIntegrationFlow)
@Bean public IntegrationFlow methodInvokingFlow() { return IntegrationFlows.from("methodInvokingInput") .handle(this.greetingService) .get(); }
@Bean public IntegrationFlow routeMethodInvocationFlow2() { return IntegrationFlows.from("routerMethod2Input") .route(new RoutingTestBean()) .get(); }
@Bean public IntegrationFlow subFlow() { return IntegrationFlows .from("processChannel") .<String, String>transform(String::toUpperCase) .channel("replyChannel") .get(); }
@Bean public IntegrationFlow errorRecovererFlow() { return IntegrationFlows.from(Function.class, "errorRecovererFunction") .handle((GenericHandler<?>) (p, h) -> { throw new RuntimeException("intentional"); }, e -> e.advice(retryAdvice())) .get(); }
@Bean public IntegrationFlow myFlow() { return IntegrationFlows .from(() -> new GenericMessage<>("myData"), e -> e.id("mySourceEndpoint")) .<String, String>transform(String::toUpperCase) .channel(results()) .get(); }
@Bean public IntegrationFlow jmsInboundFlow() { return IntegrationFlows .from(Jms.inboundAdapter(jmsConnectionFactory()).destination("jmsInbound")) .<String, String>transform(String::toUpperCase) .channel(this.jmsOutboundInboundReplyChannel()) .get(); }
@Override @Bean public IntegrationFlow flow() { return IntegrationFlows.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf())) .filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate")) .remoteDirectory("."), e -> e.poller(Pollers.fixedDelay(1).advice(advice()))) .channel(MessageChannels.queue("files")) .get(); }