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.ProxyType
static final SftpFileSystemConfigBuilder.ProxyType
-
Method Summary
Modifier and TypeMethodDescriptionprotected Class
File[]
static SftpFileSystemConfigBuilder
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.int
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.Get the proxy type to use for sftp connection.getTimeout
(FileSystemOptions opts) com.jcraft.jsch.UserInfo
getUserInfo
(FileSystemOptions opts) void
setCompression
(FileSystemOptions opts, String compression) configure the compression to use.
e.g.void
setIdentities
(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 ;-)void
setKnownHosts
(FileSystemOptions opts, File sshdir) Set the known_hosts file.void
setProxyHost
(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.void
setProxyPort
(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.void
setProxyType
(FileSystemOptions opts, SftpFileSystemConfigBuilder.ProxyType proxyType) Set the proxy type to use for sftp connection.void
setStrictHostKeyChecking
(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.void
setTimeout
(FileSystemOptions opts, Integer timeout) set the timeout value on jsch sessionvoid
setUserDirIsRoot
(FileSystemOptions opts, boolean userDirIsRoot) use user directory as root (do not change to fs root)void
setUserInfo
(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:
getConfigClass
in 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.
-