StandardSftpConnection
instead.@ComponentProfile(summary="Deprecated: Use StandardSftpConnection instead", tag="connections,sftp") @Deprecated @Removal(version="3.9.0", message="Use StandardSftpConnection instead") public class SftpConnection extends FileTransferConnectionUsingPassword
Handles URLs in the form sftp://[user:pw]@host[:port]/path/to/directory/root
In the adapter configuration file this class is aliased as sftp-connection which is the preferred alternative to the fully qualified classname when building your configuration.
FileTransferConnection.UserInfo
DEFAULT_EXPIRATION, DEFAULT_MAX_CACHE_SIZE
log
Constructor and Description |
---|
SftpConnection()
Deprecated.
Default Constructor with the following default values.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptProtocol(java.lang.String s)
Deprecated.
Validate the URL Protocol when a URL is used.
|
protected FileTransferClient |
create(java.lang.String remoteHost,
int port,
FileTransferConnection.UserInfo ui)
Deprecated.
Create an instance of the
FileTransferClient for use with the producer or consumer. |
int |
defaultControlPort()
Deprecated.
|
ConfigBuilder |
getConfiguration()
Deprecated.
|
java.lang.String |
getKnownHostsFile()
Deprecated.
|
java.lang.Integer |
getSocketTimeout()
Deprecated.
|
void |
setConfiguration(ConfigBuilder repo)
Deprecated.
Set the config repository.
|
void |
setKnownHostsFile(java.lang.String k)
Deprecated.
|
void |
setSocketTimeout(java.lang.Integer t)
Deprecated.
The socket timeout in milliseconds for connect / read /write operations.
|
createUserInfo, defaultPassword, getDefaultPassword, initConnection, setDefaultPassword
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
prepareConnection, startConnection, stopConnection
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getLookupName, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setLookupName, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
public SftpConnection()
protected boolean acceptProtocol(java.lang.String s)
FileTransferConnection
acceptProtocol
in class FileTransferConnection
s
- the URL Protocolprotected FileTransferClient create(java.lang.String remoteHost, int port, FileTransferConnection.UserInfo ui) throws java.io.IOException, FileTransferException, PasswordException
FileTransferConnection
FileTransferClient
for use with the producer or consumer.create
in class FileTransferConnection
remoteHost
- the remote host.port
- the port to connect toui
- a local UserInfo containing username and passwordFileTransferClient
objectjava.io.IOException
- wrapping a general comms error.FileTransferException
- if a protocol specific exception occurred.PasswordException
public java.lang.Integer getSocketTimeout()
public void setSocketTimeout(java.lang.Integer t)
t
- The socketTimeout to set, default is 60000public java.lang.String getKnownHostsFile()
public void setKnownHostsFile(java.lang.String k)
public int defaultControlPort()
defaultControlPort
in class FileTransferConnection
public ConfigBuilder getConfiguration()
public void setConfiguration(ConfigBuilder repo)
Use a config repository to set various SSH based settings (such as PreferredAuthentications
or
ServerAliveInterval
.
repo
- the configRepository to set