Package com.adaptris.core.ftp
Class FtpSslConnection
- java.lang.Object
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisConnection
,ComponentLifecycle
,ComponentLifecycleExtension
,StateManagedComponent
@ComponentProfile(summary="Connect to a FTP Server with explicit SSL with a username and password", tag="connections,ftps") public class FtpSslConnection extends FtpConnectionImp
Allows connections to FTP (Explicit) SSL connections.This was tested against vsftpd (2.0.5) which was configured with the following additional parameters.
ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=NO force_local_logins_ssl=NO ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO
Implicit FTP/SSL connections have not been tested; but can be enabled using
setImplicitSsl(Boolean)
In the adapter configuration file this class is aliased as ftp-ssl-connection which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.ftp.FileTransferConnection
FileTransferConnection.UserInfo
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ftp.FileTransferConnection
DEFAULT_EXPIRATION, DEFAULT_MAX_CACHE_SIZE
-
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log
-
-
Constructor Summary
Constructors Constructor Description FtpSslConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
acceptProtocol(java.lang.String s)
Validate the URL Protocol when a URL is used.protected ApacheFtpClientImpl
createFtpClient(java.lang.String remoteHost, int port, int timeoutSecs)
java.lang.Boolean
getImplicitSsl()
void
setImplicitSsl(java.lang.Boolean b)
Set the connection to use Implicit SSL-
Methods inherited from class com.adaptris.core.ftp.FtpConnectionImp
create, defaultControlPort, getAdditionalSettings, getDefaultAccount, getFtpDataMode, getServerTimezone, getSocketTimeout, getTransferType, initConnection, setAdditionalSettings, setDefaultAccount, setFtpDataMode, setServerTimezone, setSocketTimeout, setTransferType
-
Methods inherited from class com.adaptris.core.ftp.FileTransferConnectionUsingPassword
createUserInfo, defaultPassword, getDefaultPassword, setDefaultPassword
-
Methods inherited from class com.adaptris.core.ftp.FileTransferConnection
additionalDebug, cacheConnection, closeConnection, connect, disconnect, expirationMillis, forceRelativePath, getAdditionalDebug, getCacheConnection, getCacheExpiration, getDefaultControlPort, getDefaultUserName, getDirectoryRoot, getForceRelativePath, getMaxClientCacheSize, getWindowsWorkAround, maxClientCacheSize, setAdditionalDebug, setCacheConnection, setCacheExpiration, setDefaultControlPort, setDefaultUserName, setForceRelativePath, setMaxClientCache, setWindowsWorkAround, windowsWorkaround, withCacheExpiration
-
Methods inherited from class com.adaptris.core.NoOpConnection
prepareConnection, startConnection, stopConnection
-
Methods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
-
-
-
Method Detail
-
acceptProtocol
protected boolean acceptProtocol(java.lang.String s)
Description copied from class:FileTransferConnection
Validate the URL Protocol when a URL is used.- Specified by:
acceptProtocol
in classFileTransferConnection
- Parameters:
s
- the URL Protocol- Returns:
- true if the URL protocol is acceptable to the concrete imp.
-
createFtpClient
protected ApacheFtpClientImpl createFtpClient(java.lang.String remoteHost, int port, int timeoutSecs) throws java.io.IOException
- Specified by:
createFtpClient
in classFtpConnectionImp
- Throws:
java.io.IOException
-
getImplicitSsl
public java.lang.Boolean getImplicitSsl()
-
setImplicitSsl
public void setImplicitSsl(java.lang.Boolean b)
- Parameters:
b
- defaults to null (false)
-
-