Class SftpConfiguration
- java.lang.Object
-
- org.apache.camel.component.file.GenericFileConfiguration
-
- org.apache.camel.component.file.remote.RemoteFileConfiguration
-
- org.apache.camel.component.file.remote.SftpConfiguration
-
@UriParams public class SftpConfiguration extends RemoteFileConfiguration
Secure FTP configuration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.camel.component.file.remote.RemoteFileConfiguration
RemoteFileConfiguration.PathSeparator
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SFTP_PORT
-
Constructor Summary
Constructors Constructor Description SftpConfiguration()
SftpConfiguration(URI uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getBindAddress()
Integer
getBulkRequests()
String
getChmod()
String
getChmodDirectory()
String
getCiphers()
int
getCompression()
org.apache.camel.LoggingLevel
getJschLoggingLevel()
String
getKeyExchangeProtocols()
KeyPair
getKeyPair()
byte[]
getKnownHosts()
String
getKnownHostsFile()
String
getKnownHostsUri()
String
getPreferredAuthentications()
byte[]
getPrivateKey()
String
getPrivateKeyFile()
String
getPrivateKeyFilePassphrase()
Deprecated.String
getPrivateKeyPassphrase()
String
getPrivateKeyUri()
String
getPublicKeyAcceptedAlgorithms()
int
getServerAliveCountMax()
int
getServerAliveInterval()
String
getServerHostKeys()
String
getStrictHostKeyChecking()
boolean
isExistDirCheckUsingLs()
boolean
isUseUserKnownHostsFile()
void
setBindAddress(String bindAddress)
Specifies the address of the local interface against which the connection should bind.void
setBulkRequests(Integer bulkRequests)
Specifies how many requests may be outstanding at any one time.void
setChmod(String chmod)
Allows you to set chmod on the stored file.void
setChmodDirectory(String chmodDirectory)
Allows you to set chmod during path creation.void
setCiphers(String ciphers)
Set a comma separated list of ciphers that will be used in order of preference.void
setCompression(int compression)
To use compression.protected void
setDefaultPort()
void
setExistDirCheckUsingLs(boolean existDirCheckUsingLs)
Whether to check for existing directory using LS command or CD.void
setJschLoggingLevel(org.apache.camel.LoggingLevel jschLoggingLevel)
The logging level to use for JSCH activity logging.void
setKeyExchangeProtocols(String keyExchangeProtocols)
Set a comma separated list of key exchange protocols that will be used in order of preference.void
setKeyPair(KeyPair keyPair)
Sets a key pair of the public and private key so to that the SFTP endpoint can do public/private key verification.void
setKnownHosts(byte[] knownHosts)
Sets the known_hosts from the byte array, so that the SFTP endpoint can do host key verification.void
setKnownHostsFile(String knownHostsFile)
Sets the known_hosts file, so that the SFTP endpoint can do host key verification.void
setKnownHostsUri(String knownHostsUri)
Sets the known_hosts file (loaded from classpath by default), so that the SFTP endpoint can do host key verification.void
setPreferredAuthentications(String pAuthentications)
Set the preferred authentications which SFTP endpoint will used.void
setPrivateKey(byte[] privateKey)
Set the private key as byte[] so that the SFTP endpoint can do private key verification.void
setPrivateKeyFile(String privateKeyFile)
Set the private key file so that the SFTP endpoint can do private key verification.void
setPrivateKeyFilePassphrase(String privateKeyFilePassphrase)
Deprecated.void
setPrivateKeyPassphrase(String privateKeyFilePassphrase)
Set the private key file passphrase so that the SFTP endpoint can do private key verification.void
setPrivateKeyUri(String privateKeyUri)
Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do private key verification.void
setPublicKeyAcceptedAlgorithms(String publicKeyAcceptedAlgorithms)
Set a comma separated list of public key accepted algorithms.void
setServerAliveCountMax(int serverAliveCountMax)
Sets the number of keep-alive messages which may be sent without receiving any messages back from the server.void
setServerAliveInterval(int serverAliveInterval)
Sets the interval (millis) to send a keep-alive message.void
setServerHostKeys(String serverHostKeys)
Set a comma separated list of algorithms supported for the server host key.void
setStrictHostKeyChecking(String strictHostKeyChecking)
Sets whether to use strict host key checking.void
setUseUserKnownHostsFile(boolean useUserKnownHostsFile)
If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hosts-
Methods inherited from class org.apache.camel.component.file.remote.RemoteFileConfiguration
configure, getConnectTimeout, getDirectoryName, getHost, getPassword, getPort, getProtocol, getSeparator, getSiteCommand, getSoTimeout, getTimeout, getUsername, isBinary, isIgnoreFileNotFoundOrPermissionError, isPassiveMode, isSendNoop, isStepwise, isStreamDownload, isThrowExceptionOnConnectFailed, isUseList, needToNormalize, normalizePath, remoteServerInformation, setBinary, setConnectTimeout, setDirectoryName, setHost, setIgnoreFileNotFoundOrPermissionError, setPassiveMode, setPassword, setPort, setProtocol, setSendNoop, setSeparator, setSiteCommand, setSoTimeout, setStepwise, setStreamDownload, setThrowExceptionOnConnectFailed, setTimeout, setUseList, setUsername
-
-
-
-
Field Detail
-
DEFAULT_SFTP_PORT
public static final int DEFAULT_SFTP_PORT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SftpConfiguration
public SftpConfiguration()
-
SftpConfiguration
public SftpConfiguration(URI uri)
-
-
Method Detail
-
setDefaultPort
protected void setDefaultPort()
- Specified by:
setDefaultPort
in classRemoteFileConfiguration
-
getKnownHostsFile
public String getKnownHostsFile()
-
setKnownHostsFile
public void setKnownHostsFile(String knownHostsFile)
Sets the known_hosts file, so that the SFTP endpoint can do host key verification.
-
getKnownHostsUri
public String getKnownHostsUri()
-
isUseUserKnownHostsFile
public boolean isUseUserKnownHostsFile()
-
setUseUserKnownHostsFile
public void setUseUserKnownHostsFile(boolean useUserKnownHostsFile)
If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hosts
-
setKnownHostsUri
public void setKnownHostsUri(String knownHostsUri)
Sets the known_hosts file (loaded from classpath by default), so that the SFTP endpoint can do host key verification.
-
getKnownHosts
public byte[] getKnownHosts()
-
setKnownHosts
public void setKnownHosts(byte[] knownHosts)
Sets the known_hosts from the byte array, so that the SFTP endpoint can do host key verification.
-
getPrivateKeyFile
public String getPrivateKeyFile()
-
setPrivateKeyFile
public void setPrivateKeyFile(String privateKeyFile)
Set the private key file so that the SFTP endpoint can do private key verification.
-
getPrivateKeyUri
public String getPrivateKeyUri()
-
setPrivateKeyUri
public void setPrivateKeyUri(String privateKeyUri)
Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do private key verification.
-
getPrivateKey
public byte[] getPrivateKey()
-
setPrivateKey
public void setPrivateKey(byte[] privateKey)
Set the private key as byte[] so that the SFTP endpoint can do private key verification.
-
getPrivateKeyPassphrase
public String getPrivateKeyPassphrase()
-
setPrivateKeyPassphrase
public void setPrivateKeyPassphrase(String privateKeyFilePassphrase)
Set the private key file passphrase so that the SFTP endpoint can do private key verification.
-
getPrivateKeyFilePassphrase
@Deprecated public String getPrivateKeyFilePassphrase()
Deprecated.
-
setPrivateKeyFilePassphrase
@Deprecated public void setPrivateKeyFilePassphrase(String privateKeyFilePassphrase)
Deprecated.
-
getKeyPair
public KeyPair getKeyPair()
-
setKeyPair
public void setKeyPair(KeyPair keyPair)
Sets a key pair of the public and private key so to that the SFTP endpoint can do public/private key verification.
-
getStrictHostKeyChecking
public String getStrictHostKeyChecking()
-
setStrictHostKeyChecking
public void setStrictHostKeyChecking(String strictHostKeyChecking)
Sets whether to use strict host key checking.
-
setServerAliveInterval
public void setServerAliveInterval(int serverAliveInterval)
Sets the interval (millis) to send a keep-alive message. If zero is specified, any keep-alive message must not be sent. The default interval is zero.
-
getServerAliveInterval
public int getServerAliveInterval()
-
setServerAliveCountMax
public void setServerAliveCountMax(int serverAliveCountMax)
Sets the number of keep-alive messages which may be sent without receiving any messages back from the server. If this threshold is reached while keep-alive messages are being sent, the connection will be disconnected. The default value is one.
-
getServerAliveCountMax
public int getServerAliveCountMax()
-
setChmod
public void setChmod(String chmod)
Allows you to set chmod on the stored file. For example chmod=640.
-
getChmod
public String getChmod()
-
setChmodDirectory
public void setChmodDirectory(String chmodDirectory)
Allows you to set chmod during path creation. For example chmod=640.
-
getChmodDirectory
public String getChmodDirectory()
-
setCiphers
public void setCiphers(String ciphers)
Set a comma separated list of ciphers that will be used in order of preference. Possible cipher names are defined by JCraft JSCH. Some examples include: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc. If not specified the default list from JSCH will be used.
-
getCiphers
public String getCiphers()
-
getCompression
public int getCompression()
-
setCompression
public void setCompression(int compression)
To use compression. Specify a level from 1 to 10. Important: You must manually add the needed JSCH zlib JAR to the classpath for compression support.
-
setPreferredAuthentications
public void setPreferredAuthentications(String pAuthentications)
Set the preferred authentications which SFTP endpoint will used. Some example include:password,publickey. If not specified the default list from JSCH will be used.
-
getPreferredAuthentications
public String getPreferredAuthentications()
-
getJschLoggingLevel
public org.apache.camel.LoggingLevel getJschLoggingLevel()
-
setJschLoggingLevel
public void setJschLoggingLevel(org.apache.camel.LoggingLevel jschLoggingLevel)
The logging level to use for JSCH activity logging. As JSCH is verbose at by default at INFO level the threshold is WARN by default.
-
setBulkRequests
public void setBulkRequests(Integer bulkRequests)
Specifies how many requests may be outstanding at any one time. Increasing this value may slightly improve file transfer speed but will increase memory usage.
-
getBulkRequests
public Integer getBulkRequests()
-
setBindAddress
public void setBindAddress(String bindAddress)
Specifies the address of the local interface against which the connection should bind.
-
getBindAddress
public String getBindAddress()
-
isExistDirCheckUsingLs
public boolean isExistDirCheckUsingLs()
-
setExistDirCheckUsingLs
public void setExistDirCheckUsingLs(boolean existDirCheckUsingLs)
Whether to check for existing directory using LS command or CD. By default LS is used which is safer as otherwise Camel needs to change the directory back after checking. However LS has been reported to cause a problem on windows system in some situations and therefore you can disable this option to use CD.
-
getKeyExchangeProtocols
public String getKeyExchangeProtocols()
-
setKeyExchangeProtocols
public void setKeyExchangeProtocols(String keyExchangeProtocols)
Set a comma separated list of key exchange protocols that will be used in order of preference. Possible cipher names are defined by JCraft JSCH. Some examples include: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521. If not specified the default list from JSCH will be used.
-
getServerHostKeys
public String getServerHostKeys()
-
setServerHostKeys
public void setServerHostKeys(String serverHostKeys)
Set a comma separated list of algorithms supported for the server host key. Some examples include: ssh-dss,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521. If not specified the default list from JSCH will be used.
-
getPublicKeyAcceptedAlgorithms
public String getPublicKeyAcceptedAlgorithms()
-
setPublicKeyAcceptedAlgorithms
public void setPublicKeyAcceptedAlgorithms(String publicKeyAcceptedAlgorithms)
Set a comma separated list of public key accepted algorithms. Some examples include: ssh-dss,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521. If not specified the default list from JSCH will be used.
-
-