public final class SftpFileSystemConfigBuilder extends FileSystemConfigBuilder
Modifier and Type | Class and Description |
---|---|
static class |
SftpFileSystemConfigBuilder.ProxyType
Proxy type.
|
Modifier and Type | Field and Description |
---|---|
static SftpFileSystemConfigBuilder.ProxyType |
PROXY_HTTP
HTTP Proxy.
|
static SftpFileSystemConfigBuilder.ProxyType |
PROXY_SOCKS5
SOCKS Proxy.
|
Modifier and Type | Method and Description |
---|---|
String |
getCompression(FileSystemOptions opts) |
protected Class<? extends FileSystem> |
getConfigClass() |
File[] |
getIdentities(FileSystemOptions opts) |
static SftpFileSystemConfigBuilder |
getInstance() |
File |
getKnownHosts(FileSystemOptions opts) |
String |
getPreferredAuthentications(FileSystemOptions opts)
Get authentication order.
|
String |
getProxyHost(FileSystemOptions opts)
Get the proxy to use for sftp connection.
|
int |
getProxyPort(FileSystemOptions opts)
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.
|
SftpFileSystemConfigBuilder.ProxyType |
getProxyType(FileSystemOptions opts)
Get the proxy type to use for sftp connection.
|
String |
getStrictHostKeyChecking(FileSystemOptions opts) |
Integer |
getTimeout(FileSystemOptions opts) |
Boolean |
getUserDirIsRoot(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 |
setPreferredAuthentications(FileSystemOptions opts,
String preferredAuthentications)
Configure authentication order.
|
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.
|
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 session.
|
void |
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.
|
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setRootURI
public static final SftpFileSystemConfigBuilder.ProxyType PROXY_HTTP
public static final SftpFileSystemConfigBuilder.ProxyType PROXY_SOCKS5
public static SftpFileSystemConfigBuilder getInstance()
public void setUserInfo(FileSystemOptions opts, com.jcraft.jsch.UserInfo info)
opts
- The FileSystem options.info
- User information.public com.jcraft.jsch.UserInfo getUserInfo(FileSystemOptions opts)
opts
- The FileSystem options.setUserInfo(org.apache.commons.vfs2.FileSystemOptions, com.jcraft.jsch.UserInfo)
public void setKnownHosts(FileSystemOptions opts, File sshdir) throws FileSystemException
opts
- The FileSystem options.sshdir
- The known hosts directory.FileSystemException
- if an error occurs.public File getKnownHosts(FileSystemOptions opts)
opts
- The FileSystem options.setKnownHosts(org.apache.commons.vfs2.FileSystemOptions, java.io.File)
public void setIdentities(FileSystemOptions opts, File[] identities) throws FileSystemException
opts
- The FileSystem options.identities
- An array of identity Files.FileSystemException
- if an error occurs.public void setCompression(FileSystemOptions opts, String compression) throws FileSystemException
opts
- The FileSystem options.compression
- The compression algorithm name.FileSystemException
- if an error occurs.public String getCompression(FileSystemOptions opts)
opts
- The FileSystem options.setCompression(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public File[] getIdentities(FileSystemOptions opts)
opts
- The FileSystem options.setIdentities(org.apache.commons.vfs2.FileSystemOptions, java.io.File[])
public void setStrictHostKeyChecking(FileSystemOptions opts, String hostKeyChecking) throws FileSystemException
opts
- The FileSystem options.hostKeyChecking
- The host key checking to use.FileSystemException
- if an error occurs.public String getStrictHostKeyChecking(FileSystemOptions opts)
opts
- The FileSystem options.setStrictHostKeyChecking(FileSystemOptions, String)
public void setUserDirIsRoot(FileSystemOptions opts, boolean userDirIsRoot)
opts
- The FileSystem options.userDirIsRoot
- true if the user dir is the root directory.public Boolean getUserDirIsRoot(FileSystemOptions opts)
opts
- The FileSystemOptions.setUserDirIsRoot(org.apache.commons.vfs2.FileSystemOptions, boolean)
public void setTimeout(FileSystemOptions opts, Integer timeout)
opts
- The FileSystem options.timeout
- The timeout.public Integer getTimeout(FileSystemOptions opts)
opts
- The FileSystem options.setTimeout(org.apache.commons.vfs2.FileSystemOptions, java.lang.Integer)
protected Class<? extends FileSystem> getConfigClass()
getConfigClass
in class FileSystemConfigBuilder
public void setProxyHost(FileSystemOptions opts, String proxyHost)
opts
- The FileSystem options.proxyHost
- the hostsetProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
public void setProxyPort(FileSystemOptions opts, int proxyPort)
opts
- The FileSystem options.proxyPort
- the portsetProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public String getProxyHost(FileSystemOptions opts)
opts
- The FileSystem options.setProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
public int getProxyPort(FileSystemOptions opts)
opts
- The FileSystem options.setProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public void setProxyType(FileSystemOptions opts, SftpFileSystemConfigBuilder.ProxyType proxyType)
opts
- The FileSystem options.proxyType
- the type of the proxy to use.public SftpFileSystemConfigBuilder.ProxyType getProxyType(FileSystemOptions opts)
opts
- The FileSystem options.public void setPreferredAuthentications(FileSystemOptions opts, String preferredAuthentications)
opts
- The FileSystem options.preferredAuthentications
- The authentication order.public String getPreferredAuthentications(FileSystemOptions opts)
opts
- The FileSystem options.Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.