public interface SftpClientFactory
static SftpClientFactory instance()
default SftpClient createSftpClient(ClientSession session) throws IOException
session
- The ClientSession
to be used for creating the SFTP clientSftpClient
IOException
- if failed to create the clientdefault SftpClient createSftpClient(ClientSession session, int version) throws 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
IOException
- If failed to create the client or use the specified versiondefault SftpClient createSftpClient(ClientSession session, SftpVersionSelector selector) throws IOException
session
- The ClientSession
to which the SFTP client should be attachedselector
- The SftpVersionSelector
to use in order to negotiate the SFTP versionSftpClient
instanceIOException
- If failed to create the clientdefault SftpClient createSftpClient(ClientSession session, SftpErrorDataHandler errorDataHandler) throws IOException
session
- The ClientSession
to be used for creating the SFTP clienterrorDataHandler
- The SftpErrorDataHandler
to handle incoming data through the error stream - if
null
the data is silently ignoredSftpClient
IOException
- if failed to create the clientSftpClient createSftpClient(ClientSession session, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler) throws IOException
session
- The ClientSession
to which the SFTP client should be attachedselector
- The SftpVersionSelector
to use in order to negotiate the SFTP versionerrorDataHandler
- The SftpErrorDataHandler
to handle incoming data through the error stream - if
null
the data is silently ignoredSftpClient
instanceIOException
- If failed to create the clientdefault SftpFileSystem createSftpFileSystem(ClientSession session) throws IOException
IOException
default SftpFileSystem createSftpFileSystem(ClientSession session, int version) throws IOException
IOException
default SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector) throws IOException
IOException
default SftpFileSystem createSftpFileSystem(ClientSession session, int version, int readBufferSize, int writeBufferSize) throws IOException
IOException
default SftpFileSystem createSftpFileSystem(ClientSession session, int readBufferSize, int writeBufferSize) throws IOException
IOException
default SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector, int readBufferSize, int writeBufferSize) throws IOException
IOException
SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler, int readBufferSize, int writeBufferSize) throws 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 versionerrorDataHandler
- The SftpErrorDataHandler
to handle incoming data through the error stream - if
null
the data is silently ignoredreadBufferSize
- Default I/O read buffer sizewriteBufferSize
- Default I/O write buffer sizeSftpFileSystem
instanceIOException
- If failed to create the instanceCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.