diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java index 98a117228b..3934e71d9b 100644 --- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java +++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java @@ -53,6 +53,10 @@ import org.springframework.util.Assert; /** * Factory for creating {@link SftpSession} instances. + *

+ * The {@link #createSftpClient(ClientSession, SftpVersionSelector, SftpErrorDataHandler)} + * can be overridden to provide a custom {@link SftpClient}. + * The {@link ConcurrentSftpClient} is used by default. * * @author Josh Long * @author Mario Gray @@ -65,6 +69,7 @@ import org.springframework.util.Assert; * @author Krzysztof Debski * @author Auke Zaaiman * @author Christian Tzolov + * @author Adama Sorho * * @since 2.0 */ @@ -282,9 +287,7 @@ public class DefaultSftpSessionFactory implements SessionFactory ...); + return sftpChannelSubsystem; +} +---- + [[sftp-session-factory-properties]] == Configuration Properties diff --git a/src/reference/antora/modules/ROOT/pages/whats-new.adoc b/src/reference/antora/modules/ROOT/pages/whats-new.adoc index 40e73c67e7..a573c495f5 100644 --- a/src/reference/antora/modules/ROOT/pages/whats-new.adoc +++ b/src/reference/antora/modules/ROOT/pages/whats-new.adoc @@ -72,3 +72,9 @@ See xref:mongodb.adoc#mongodb-message-store[MongoDB Message Store] for an exampl `FtpLastModifiedFileListFilter`, `SftpLastModifiedFileListFilter` and `SmbLastModifiedFileListFilter` have been introduced to allow files filtering based on a last-modified strategy respectively for `FTP`, `SFTP` and `SMB`. See xref:ftp/inbound.adoc#ftp-inbound[FTP Inbound Channel Adapter], xref:sftp/inbound.adoc#sftp-inbound[SFTP Inbound Channel Adapter], and xref:smb.adoc#smb-inbound[SMB Inbound Channel Adapter] for more information. + +[[x6.2-sftp-changes]] +=== SFTP Support Changes + +A new `DefaultSftpSessionFactory.createSftpClient(...)` method has been introduced to support a custom `SftpClient` when overridden. +See xref:sftp/session-factory.adoc#sftp-session-factory[SFTP Session Factory] for more information.