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
Secure FTP configuration
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.component.file.remote.RemoteFileConfiguration
RemoteFileConfiguration.PathSeparator -
Field Summary
FieldsFields inherited from class org.apache.camel.component.file.GenericFileConfiguration
directory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChmod()intorg.apache.camel.LoggingLevelbyte[]byte[]Deprecated.intintorg.apache.camel.LoggingLevelbooleanbooleanbooleanvoidsetAutoCreateKnownHostsFile(boolean autoCreateKnownHostsFile) If knownHostFile does not exist, then attempt to auto-create the path and file (beware that the file will be created by the current user of the running Java process, which may not have file permission).voidsetBindAddress(String bindAddress) Specifies the address of the local interface against which the connection should bind.voidsetBulkRequests(Integer bulkRequests) Specifies how many requests may be outstanding at any one time.voidAllows you to set chmod on the stored file.voidsetChmodDirectory(String chmodDirectory) Allows you to set chmod during path creation.voidsetCiphers(String ciphers) Set a comma separated list of ciphers that will be used in order of preference.voidsetCompression(int compression) To use compression.protected voidvoidsetExistDirCheckUsingLs(boolean existDirCheckUsingLs) Whether to check for existing directory using LS command or CD.voidsetFilenameEncoding(String filenameEncoding) Encoding to use for FTP client when parsing filenames.voidsetJschLoggingLevel(org.apache.camel.LoggingLevel jschLoggingLevel) The logging level to use for JSCH activity logging.voidsetKeyExchangeProtocols(String keyExchangeProtocols) Set a comma separated list of key exchange protocols that will be used in order of preference.voidsetKeyPair(KeyPair keyPair) Sets a key pair of the public and private key so to that the SFTP endpoint can do public/private key verification.voidsetKnownHosts(byte[] knownHosts) Sets the known_hosts from the byte array, so that the SFTP endpoint can do host key verification.voidsetKnownHostsFile(String knownHostsFile) Sets the known_hosts file, so that the SFTP endpoint can do host key verification.voidsetKnownHostsUri(String knownHostsUri) Sets the known_hosts file (loaded from classpath by default), so that the SFTP endpoint can do host key verification.voidsetPreferredAuthentications(String pAuthentications) Set the preferred authentications which SFTP endpoint will used.voidsetPrivateKey(byte[] privateKey) Set the private key as byte[] so that the SFTP endpoint can do private key verification.voidsetPrivateKeyFile(String privateKeyFile) Set the private key file so that the SFTP endpoint can do private key verification.voidsetPrivateKeyFilePassphrase(String privateKeyFilePassphrase) Deprecated.voidsetPrivateKeyPassphrase(String privateKeyFilePassphrase) Set the private key file passphrase so that the SFTP endpoint can do private key verification.voidsetPrivateKeyUri(String privateKeyUri) Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do private key verification.voidsetPublicKeyAcceptedAlgorithms(String publicKeyAcceptedAlgorithms) Set a comma separated list of public key accepted algorithms.voidsetServerAliveCountMax(int serverAliveCountMax) Sets the number of keep-alive messages which may be sent without receiving any messages back from the server.voidsetServerAliveInterval(int serverAliveInterval) Sets the interval (millis) to send a keep-alive message.voidsetServerHostKeys(String serverHostKeys) Set a comma separated list of algorithms supported for the server host key.voidsetServerMessageLoggingLevel(org.apache.camel.LoggingLevel serverMessageLoggingLevel) The logging level used for various human intended log messages from the FTP server.voidsetStrictHostKeyChecking(String strictHostKeyChecking) Sets whether to use strict host key checking.voidsetUseUserKnownHostsFile(boolean useUserKnownHostsFile) If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hostsMethods 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, setUsernameMethods inherited from class org.apache.camel.component.file.GenericFileConfiguration
getDirectory, setDirectory, toString
-
Field Details
-
DEFAULT_SFTP_PORT
public static final int DEFAULT_SFTP_PORT- See Also:
-
-
Constructor Details
-
SftpConfiguration
public SftpConfiguration() -
SftpConfiguration
-
-
Method Details
-
setDefaultPort
protected void setDefaultPort()- Specified by:
setDefaultPortin classRemoteFileConfiguration
-
getKnownHostsFile
-
setKnownHostsFile
Sets the known_hosts file, so that the SFTP endpoint can do host key verification. -
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 -
isAutoCreateKnownHostsFile
public boolean isAutoCreateKnownHostsFile() -
setAutoCreateKnownHostsFile
public void setAutoCreateKnownHostsFile(boolean autoCreateKnownHostsFile) If knownHostFile does not exist, then attempt to auto-create the path and file (beware that the file will be created by the current user of the running Java process, which may not have file permission). -
setKnownHostsUri
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
-
setPrivateKeyFile
Set the private key file so that the SFTP endpoint can do private key verification. -
getPrivateKeyUri
-
setPrivateKeyUri
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
-
setPrivateKeyPassphrase
Set the private key file passphrase so that the SFTP endpoint can do private key verification. -
getPrivateKeyFilePassphrase
Deprecated. -
setPrivateKeyFilePassphrase
Deprecated. -
getKeyPair
-
setKeyPair
Sets a key pair of the public and private key so to that the SFTP endpoint can do public/private key verification. -
getStrictHostKeyChecking
-
setStrictHostKeyChecking
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
Allows you to set chmod on the stored file. For example chmod=640. -
getChmod
-
setChmodDirectory
Allows you to set chmod during path creation. For example chmod=640. -
getChmodDirectory
-
setCiphers
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
-
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
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
-
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
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
-
setBindAddress
Specifies the address of the local interface against which the connection should bind. -
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
-
setKeyExchangeProtocols
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
-
setServerHostKeys
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
-
setPublicKeyAcceptedAlgorithms
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. -
getFilenameEncoding
-
setFilenameEncoding
Encoding to use for FTP client when parsing filenames. By default, UTF-8 is used. -
getServerMessageLoggingLevel
public org.apache.camel.LoggingLevel getServerMessageLoggingLevel() -
setServerMessageLoggingLevel
public void setServerMessageLoggingLevel(org.apache.camel.LoggingLevel serverMessageLoggingLevel) The logging level used for various human intended log messages from the FTP server. This can be used during troubleshooting to raise the logging level and inspect the logs received from the FTP server.
-