Class SftpFileSystemConfigBuilder
java.lang.Object
org.apache.commons.vfs.FileSystemConfigBuilder
org.apache.commons.vfs.provider.sftp.SftpFileSystemConfigBuilder
The config builder for various sftp configuration options
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Mario Ivankovits
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SftpFileSystemConfigBuilder.ProxyTypestatic final SftpFileSystemConfigBuilder.ProxyType -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassFile[]static SftpFileSystemConfigBuilderGet the proxy to use for sftp connection You have to set the ProxyPort too if you would like to have the proxy relly used.intGet the proxy-port to use for sftp the connection You have to set the ProxyHost too if you would like to have the proxy relly used.Get the proxy type to use for sftp connection.getTimeout(FileSystemOptions opts) com.jcraft.jsch.UserInfogetUserInfo(FileSystemOptions opts) voidsetCompression(FileSystemOptions opts, String compression) configure the compression to use.
e.g.voidsetIdentities(FileSystemOptions opts, File[] identities) Set the identity files (your private key files).
Need to use a java.io.File as JSch cant deal with vfs FileObjects ;-)voidsetKnownHosts(FileSystemOptions opts, File sshdir) Set the known_hosts file.voidsetProxyHost(FileSystemOptions opts, String proxyHost) Set the proxy to use for sftp connection.
You have to set the ProxyPort too if you would like to have the proxy relly used.voidsetProxyPort(FileSystemOptions opts, int proxyPort) Set the proxy-port to use for sftp connection You have to set the ProxyHost too if you would like to have the proxy relly used.voidsetProxyType(FileSystemOptions opts, SftpFileSystemConfigBuilder.ProxyType proxyType) Set the proxy type to use for sftp connection.voidsetStrictHostKeyChecking(FileSystemOptions opts, String hostKeyChecking) configure the host key checking to use.
valid arguments are only yes, no and ask.
See the jsch documentation for details.voidsetTimeout(FileSystemOptions opts, Integer timeout) set the timeout value on jsch sessionvoidsetUserDirIsRoot(FileSystemOptions opts, boolean userDirIsRoot) use user directory as root (do not change to fs root)voidsetUserInfo(FileSystemOptions opts, com.jcraft.jsch.UserInfo info) Set the userinfo class to use if e.g.Methods inherited from class org.apache.commons.vfs.FileSystemConfigBuilder
getParam, hasParam, setParam
-
Field Details
-
PROXY_HTTP
-
PROXY_SOCKS5
-
-
Method Details
-
getInstance
-
setUserInfo
Set the userinfo class to use if e.g. a password or a not known host will be contacted- Parameters:
opts-info-
-
getUserInfo
- Parameters:
opts-- See Also:
-
setKnownHosts
Set the known_hosts file. e.g. /home/user/.ssh/known_hosts2
Need to use a java.io.File as JSch cant deal with vfs FileObjects ;-)- Parameters:
opts-sshdir-- Throws:
FileSystemException
-
getKnownHosts
- Parameters:
opts-- See Also:
-
setIdentities
Set the identity files (your private key files).
Need to use a java.io.File as JSch cant deal with vfs FileObjects ;-)- Parameters:
opts-identities-- Throws:
FileSystemException
-
setCompression
configure the compression to use.
e.g. pass "zlib,none" to enable the compression.
See the jsch documentation for details.- Parameters:
opts-compression-- Throws:
FileSystemException
-
getCompression
- Parameters:
opts-- See Also:
-
getIdentities
- Parameters:
opts-- See Also:
-
setStrictHostKeyChecking
public void setStrictHostKeyChecking(FileSystemOptions opts, String hostKeyChecking) throws FileSystemException configure the host key checking to use.
valid arguments are only yes, no and ask.
See the jsch documentation for details.- Parameters:
opts-hostKeyChecking-- Throws:
FileSystemException
-
getStrictHostKeyChecking
- Parameters:
opts-- Returns:
- the option value
- See Also:
-
setUserDirIsRoot
use user directory as root (do not change to fs root)- Parameters:
opts-userDirIsRoot-
-
getUserDirIsRoot
- Parameters:
opts-- See Also:
-
setTimeout
set the timeout value on jsch session- Parameters:
opts-timeout-
-
getTimeout
- Parameters:
opts-- See Also:
-
getConfigClass
- Specified by:
getConfigClassin classFileSystemConfigBuilder
-
setProxyHost
Set the proxy to use for sftp connection.
You have to set the ProxyPort too if you would like to have the proxy relly used.- Parameters:
proxyHost- the host- See Also:
-
setProxyPort
Set the proxy-port to use for sftp connection You have to set the ProxyHost too if you would like to have the proxy relly used.- Parameters:
proxyPort- the port- See Also:
-
getProxyHost
Get the proxy to use for sftp connection You have to set the ProxyPort too if you would like to have the proxy relly used.- Returns:
- proxyHost
- See Also:
-
getProxyPort
Get the proxy-port to use for sftp the connection You have to set the ProxyHost too if you would like to have the proxy relly used.- Returns:
- proxyPort: the port number or 0 if it is not set
- See Also:
-
setProxyType
Set the proxy type to use for sftp connection. -
getProxyType
Get the proxy type to use for sftp connection.
-