Class FtpHttpProxySessionFactory
java.lang.Object
org.springframework.integration.ftp.session.AbstractFtpSessionFactory<org.apache.commons.net.ftp.FTPHTTPClient>
org.springframework.integration.ftp.session.FtpHttpProxySessionFactory
- All Implemented Interfaces:
SessionFactory<org.apache.commons.net.ftp.FTPFile>
public class FtpHttpProxySessionFactory
extends AbstractFtpSessionFactory<org.apache.commons.net.ftp.FTPHTTPClient>
An
AbstractFtpSessionFactory for the connections tunneled through an HTTP proxy
with the CONNECT method, based on the FTPHTTPClient.
Unlike the setProxy(Proxy) option of the other factories, this factory sends
the credentials of the proxy, when they are provided, with the basic authentication scheme.
Both the control connection and the data connections are tunneled through the proxy,
therefore only the FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE is supported,
and it is the default client mode of this factory.
- Since:
- 7.2
- Author:
- Sharang Gupta
-
Field Summary
Fields inherited from class AbstractFtpSessionFactory
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.commons.net.ftp.FTPHTTPClientvoidsetClientMode(int clientMode) Only theFTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODEis supported through an HTTP proxy.voidThis factory connects to the HTTP proxy directly, so an additional proxy is not supported.voidsetProxyHost(String proxyHost) Set the host of the HTTP proxy.voidsetProxyPassword(String proxyPassword) Set the password for the HTTP proxy, when the proxy requires authentication.voidsetProxyPort(int proxyPort) Set the port of the HTTP proxy.voidsetProxyUsername(String proxyUsername) Set the username for the HTTP proxy, when the proxy requires authentication.
-
Constructor Details
-
FtpHttpProxySessionFactory
public FtpHttpProxySessionFactory()
-
-
Method Details
-
setProxyHost
Set the host of the HTTP proxy.- Parameters:
proxyHost- the host of the proxy.
-
setProxyPort
public void setProxyPort(int proxyPort) Set the port of the HTTP proxy.- Parameters:
proxyPort- the port of the proxy.
-
setProxyUsername
-
setProxyPassword
Set the password for the HTTP proxy, when the proxy requires authentication.- Parameters:
proxyPassword- the password for the proxy.
-
setClientMode
public void setClientMode(int clientMode) Only theFTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODEis supported through an HTTP proxy.- Overrides:
setClientModein classAbstractFtpSessionFactory<org.apache.commons.net.ftp.FTPHTTPClient>- Parameters:
clientMode- the client mode.
-
setProxy
This factory connects to the HTTP proxy directly, so an additional proxy is not supported.- Overrides:
setProxyin classAbstractFtpSessionFactory<org.apache.commons.net.ftp.FTPHTTPClient>- Parameters:
proxy- the proxy.- See Also:
-
createClientInstance
protected org.apache.commons.net.ftp.FTPHTTPClient createClientInstance()- Specified by:
createClientInstancein classAbstractFtpSessionFactory<org.apache.commons.net.ftp.FTPHTTPClient>
-