GH-3623: Deprecarte an IntegrationFlows
Fixes https://github.com/spring-projects/spring-integration/issues/3623 * `IntegrationFlow` refactoring * Apply several code style improvements and good practices * Code style: no empty lines for methods javadocs * make deprecated implementation reuse actual one instead of the copy-paste approach * add whats-new comments * Fix whats-new page according to standards
This commit is contained in:
committed by
GitHub
parent
63759d76b9
commit
53dd050c5b
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2020 the original author or authors.
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,7 +43,6 @@ import org.springframework.integration.config.EnableIntegrationManagement;
|
||||
import org.springframework.integration.config.IntegrationManagementConfigurer;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.integration.dsl.IntegrationFlow;
|
||||
import org.springframework.integration.dsl.IntegrationFlows;
|
||||
import org.springframework.integration.dsl.Pollers;
|
||||
import org.springframework.integration.dsl.StandardIntegrationFlow;
|
||||
import org.springframework.integration.dsl.context.IntegrationFlowContext;
|
||||
@@ -91,7 +90,7 @@ public class FtpTests extends FtpTestSupport {
|
||||
public void testFtpInboundFlow() throws IOException {
|
||||
QueueChannel out = new QueueChannel();
|
||||
DirectoryScanner scanner = new DefaultDirectoryScanner();
|
||||
IntegrationFlow flow = IntegrationFlows.from(Ftp.inboundAdapter(sessionFactory())
|
||||
IntegrationFlow flow = IntegrationFlow.from(Ftp.inboundAdapter(sessionFactory())
|
||||
.preserveTimestamp(true)
|
||||
.remoteDirectory("ftpSource")
|
||||
.maxFetchSize(10)
|
||||
@@ -150,7 +149,7 @@ public class FtpTests extends FtpTestSupport {
|
||||
@Test
|
||||
public void testFtpInboundStreamFlow() throws Exception {
|
||||
QueueChannel out = new QueueChannel();
|
||||
StandardIntegrationFlow flow = IntegrationFlows.from(
|
||||
StandardIntegrationFlow flow = IntegrationFlow.from(
|
||||
Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sessionFactory()))
|
||||
.remoteDirectory("ftpSource")
|
||||
.maxFetchSize(11)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2018-2021 the original author or authors.
|
||||
* Copyright 2018-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,6 @@ import org.springframework.integration.StaticMessageHeaderAccessor;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.config.EnableIntegration;
|
||||
import org.springframework.integration.dsl.IntegrationFlow;
|
||||
import org.springframework.integration.dsl.IntegrationFlows;
|
||||
import org.springframework.integration.dsl.MessageChannels;
|
||||
import org.springframework.integration.dsl.Pollers;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
@@ -324,7 +323,7 @@ public class RotatingServersTests extends FtpTestSupport {
|
||||
|
||||
@Bean
|
||||
public IntegrationFlow flow() {
|
||||
return IntegrationFlows.from(Ftp.inboundAdapter(sf())
|
||||
return IntegrationFlow.from(Ftp.inboundAdapter(sf())
|
||||
.filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate"))
|
||||
.localDirectory(localDir())
|
||||
.remoteDirectory("."),
|
||||
@@ -360,7 +359,7 @@ public class RotatingServersTests extends FtpTestSupport {
|
||||
@Override
|
||||
@Bean
|
||||
public IntegrationFlow flow() {
|
||||
return IntegrationFlows.from(Ftp.inboundAdapter(sf())
|
||||
return IntegrationFlow.from(Ftp.inboundAdapter(sf())
|
||||
.filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate"))
|
||||
.localDirectory(new File(TMP_DIR, "variable"))
|
||||
.localFilenameExpression("#remoteDirectory + T(java.io.File).separator + #root")
|
||||
@@ -378,7 +377,7 @@ public class RotatingServersTests extends FtpTestSupport {
|
||||
@Override
|
||||
@Bean
|
||||
public IntegrationFlow flow() {
|
||||
return IntegrationFlows.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf()))
|
||||
return IntegrationFlow.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf()))
|
||||
.filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate"))
|
||||
.remoteDirectory("."),
|
||||
e -> e.poller(Pollers.fixedDelay(1).advice(advice())))
|
||||
@@ -404,7 +403,7 @@ public class RotatingServersTests extends FtpTestSupport {
|
||||
@Override
|
||||
@Bean
|
||||
public IntegrationFlow flow() {
|
||||
return IntegrationFlows.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf()))
|
||||
return IntegrationFlow.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf()))
|
||||
.filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate"))
|
||||
.remoteDirectory(".")
|
||||
.maxFetchSize(1),
|
||||
|
||||
Reference in New Issue
Block a user