public interface SftpClientFactory
Modifier and Type | Method and Description |
---|---|
default SftpClient |
createSftpClient(ClientSession session)
Create an SFTP client from this session.
|
default SftpClient |
createSftpClient(ClientSession session,
int version)
Creates an SFTP client using the specified version
|
SftpClient |
createSftpClient(ClientSession session,
SftpVersionSelector selector) |
default java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session) |
default java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session,
int version) |
default java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session,
int readBufferSize,
int writeBufferSize) |
default java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session,
int version,
int readBufferSize,
int writeBufferSize) |
default java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session,
SftpVersionSelector selector) |
java.nio.file.FileSystem |
createSftpFileSystem(ClientSession session,
SftpVersionSelector selector,
int readBufferSize,
int writeBufferSize) |
static SftpClientFactory |
instance() |
static SftpClientFactory instance()
default SftpClient createSftpClient(ClientSession session) throws java.io.IOException
session
- The ClientSession
to be used for creating the SFTP clientSftpClient
java.io.IOException
- if failed to create the clientdefault SftpClient createSftpClient(ClientSession session, int version) throws java.io.IOException
session
- The ClientSession
to be used for creating the SFTP clientversion
- The version to use - Note: if the specified
version is not supported by the server then an exception will occurSftpClient
java.io.IOException
- If failed to create the client or use the specified versionSftpClient createSftpClient(ClientSession session, SftpVersionSelector selector) throws java.io.IOException
session
- The ClientSession
to which the SFTP client should be attachedselector
- The SftpVersionSelector
to use in order to negotiate the SFTP versionSftpClient
instancejava.io.IOException
- If failed to create the clientdefault java.nio.file.FileSystem createSftpFileSystem(ClientSession session) throws java.io.IOException
java.io.IOException
default java.nio.file.FileSystem createSftpFileSystem(ClientSession session, int version) throws java.io.IOException
java.io.IOException
default java.nio.file.FileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector) throws java.io.IOException
java.io.IOException
default java.nio.file.FileSystem createSftpFileSystem(ClientSession session, int version, int readBufferSize, int writeBufferSize) throws java.io.IOException
java.io.IOException
default java.nio.file.FileSystem createSftpFileSystem(ClientSession session, int readBufferSize, int writeBufferSize) throws java.io.IOException
java.io.IOException
java.nio.file.FileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector, int readBufferSize, int writeBufferSize) throws java.io.IOException
session
- The ClientSession
to which the SFTP client backing the file system should be attachedselector
- The SftpVersionSelector
to use in order to negotiate the SFTP versionreadBufferSize
- Default I/O read buffer sizewriteBufferSize
- Default I/O write buffer sizeFileSystem
instancejava.io.IOException
- If failed to create the instance