Class Ftp
java.lang.Object
org.springframework.integration.ftp.dsl.Ftp
public final class Ftp extends Object
The factory for FTP components.
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell, Deepak Gunasekaran
-
Method Summary
Modifier and Type Method Description static FtpInboundChannelAdapterSpec
inboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory)
AFtpInboundChannelAdapterSpec
factory for an inbound channel adapter spec.static FtpInboundChannelAdapterSpec
inboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, Comparator<File> receptionOrderComparator)
AFtpInboundChannelAdapterSpec
factory for an inbound channel adapter spec.static FtpStreamingInboundChannelAdapterSpec
inboundStreamingAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate)
AFtpStreamingInboundChannelAdapterSpec
factory for an inbound channel adapter spec.static FtpStreamingInboundChannelAdapterSpec
inboundStreamingAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, Comparator<org.apache.commons.net.ftp.FTPFile> receptionOrderComparator)
AFtpStreamingInboundChannelAdapterSpec
factory for an inbound channel adapter spec.static FtpMessageHandlerSpec
outboundAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate)
Deprecated.in favor ofoutboundAdapter(FtpRemoteFileTemplate)
static FtpMessageHandlerSpec
outboundAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, FileExistsMode fileExistsMode)
Deprecated.static FtpMessageHandlerSpec
outboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory)
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.static FtpMessageHandlerSpec
outboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, FileExistsMode fileExistsMode)
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.static FtpMessageHandlerSpec
outboundAdapter(FtpRemoteFileTemplate ftpRemoteFileTemplate)
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.static FtpMessageHandlerSpec
outboundAdapter(FtpRemoteFileTemplate ftpRemoteFileTemplate, FileExistsMode fileExistsMode)
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.static FtpOutboundGatewaySpec
outboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, String command, String expression)
Produce aFtpOutboundGatewaySpec
based on theRemoteFileTemplate
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.static FtpOutboundGatewaySpec
outboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, String expression)
Produce aFtpOutboundGatewaySpec
based on theRemoteFileTemplate
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.static FtpOutboundGatewaySpec
outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, String command, String expression)
Produce aFtpOutboundGatewaySpec
based on theSessionFactory
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.static FtpOutboundGatewaySpec
outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, String expression)
Produce aFtpOutboundGatewaySpec
based on theSessionFactory
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.static FtpOutboundGatewaySpec
outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)
Produce aFtpOutboundGatewaySpec
based on theMessageSessionCallback
.
-
Method Details
-
inboundAdapter
public static FtpInboundChannelAdapterSpec inboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory)AFtpInboundChannelAdapterSpec
factory for an inbound channel adapter spec.- Parameters:
sessionFactory
- the session factory.- Returns:
- the spec.
-
inboundAdapter
public static FtpInboundChannelAdapterSpec inboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, Comparator<File> receptionOrderComparator)AFtpInboundChannelAdapterSpec
factory for an inbound channel adapter spec.- Parameters:
sessionFactory
- the session factory.receptionOrderComparator
- the comparator.- Returns:
- the spec.
-
inboundStreamingAdapter
public static FtpStreamingInboundChannelAdapterSpec inboundStreamingAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate)AFtpStreamingInboundChannelAdapterSpec
factory for an inbound channel adapter spec.- Parameters:
remoteFileTemplate
- the remote file template.- Returns:
- the spec.
-
inboundStreamingAdapter
public static FtpStreamingInboundChannelAdapterSpec inboundStreamingAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, Comparator<org.apache.commons.net.ftp.FTPFile> receptionOrderComparator)AFtpStreamingInboundChannelAdapterSpec
factory for an inbound channel adapter spec.- Parameters:
remoteFileTemplate
- the remote file template.receptionOrderComparator
- the comparator.- Returns:
- the spec.
-
outboundAdapter
public static FtpMessageHandlerSpec outboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory)AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
sessionFactory
- the session factory.- Returns:
- the spec.
-
outboundAdapter
public static FtpMessageHandlerSpec outboundAdapter(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, FileExistsMode fileExistsMode)AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
sessionFactory
- the session factory.fileExistsMode
- the file exists mode.- Returns:
- the spec.
-
outboundAdapter
@Deprecated public static FtpMessageHandlerSpec outboundAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate)Deprecated.in favor ofoutboundAdapter(FtpRemoteFileTemplate)
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
remoteFileTemplate
- the remote file template.- Returns:
- the spec.
-
outboundAdapter
@Deprecated public static FtpMessageHandlerSpec outboundAdapter(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, FileExistsMode fileExistsMode)Deprecated.AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
remoteFileTemplate
- the remote file template.fileExistsMode
- the file exists mode.- Returns:
- the spec.
-
outboundAdapter
AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
ftpRemoteFileTemplate
- the remote file template.- Returns:
- the spec.
- Since:
- 5.4
-
outboundAdapter
public static FtpMessageHandlerSpec outboundAdapter(FtpRemoteFileTemplate ftpRemoteFileTemplate, FileExistsMode fileExistsMode)AFtpMessageHandlerSpec
factory for an outbound channel adapter spec.- Parameters:
ftpRemoteFileTemplate
- the remote file template.fileExistsMode
- the file exists mode.- Returns:
- the spec.
- Since:
- 5.4
-
outboundGateway
public static FtpOutboundGatewaySpec outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, String expression)Produce aFtpOutboundGatewaySpec
based on theSessionFactory
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.- Parameters:
sessionFactory
- theSessionFactory
.command
- the command to perform on the FTP.expression
- the remoteFilePath SpEL expression.- Returns:
- the
FtpOutboundGatewaySpec
-
outboundGateway
public static FtpOutboundGatewaySpec outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, String command, String expression)Produce aFtpOutboundGatewaySpec
based on theSessionFactory
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.- Parameters:
sessionFactory
- theSessionFactory
.command
- the command to perform on the FTP.expression
- the remoteFilePath SpEL expression.- Returns:
- the
FtpOutboundGatewaySpec
- See Also:
RemoteFileTemplate
-
outboundGateway
public static FtpOutboundGatewaySpec outboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, String expression)Produce aFtpOutboundGatewaySpec
based on theRemoteFileTemplate
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.- Parameters:
remoteFileTemplate
- theRemoteFileTemplate
.command
- the command to perform on the FTP.expression
- the remoteFilePath SpEL expression.- Returns:
- the
FtpOutboundGatewaySpec
- See Also:
RemoteFileTemplate
-
outboundGateway
public static FtpOutboundGatewaySpec outboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, String command, String expression)Produce aFtpOutboundGatewaySpec
based on theRemoteFileTemplate
,AbstractRemoteFileOutboundGateway.Command
andexpression
for the remoteFilePath.- Parameters:
remoteFileTemplate
- theRemoteFileTemplate
.command
- the command to perform on the FTP.expression
- the remoteFilePath SpEL expression.- Returns:
- the
FtpOutboundGatewaySpec
- See Also:
RemoteFileTemplate
-
outboundGateway
public static FtpOutboundGatewaySpec outboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile,?> messageSessionCallback)Produce aFtpOutboundGatewaySpec
based on theMessageSessionCallback
.- Parameters:
sessionFactory
- theSessionFactory
to connect to.messageSessionCallback
- theMessageSessionCallback
to perform SFTP operation(s) with theMessage
context.- Returns:
- the
FtpOutboundGatewaySpec
- See Also:
MessageSessionCallback
-