Top Description Methods
org.apache.sshd.sftp.client

public Interface SftpClientFactory

Known Direct Implementers
org.apache.sshd.sftp.client.impl.DefaultSftpClientFactory
Imports
java.io.IOException, org.apache.sshd.client.session.ClientSession, org.apache.sshd.sftp.client.fs.SftpFileSystem, org.apache.sshd.sftp.client.impl.DefaultSftpClientFactory

TODO Add javadoc
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public default SftpClient

Returns:

The created SftpClient
createSftpClient
(ClientSession
The ClientSession to be used for creating the SFTP client
session
)

Create an SFTP client from this session.

public default SftpClient

Returns:

The created SftpClient
createSftpClient
(ClientSession
The ClientSession to be used for creating the SFTP client
session
,
int
The version to use - Note: if the specified version is not supported by the server then an exception will occur
version
)

Creates an SFTP client using the specified version

public default SftpClient

Returns:

The created SftpClient instance
createSftpClient
(ClientSession
The ClientSession to which the SFTP client should be attached
session
,
SftpVersionSelector
The SftpVersionSelector to use in order to negotiate the SFTP version
selector
)

public default SftpClient

Returns:

The created SftpClient
createSftpClient
(ClientSession
The ClientSession to be used for creating the SFTP client
session
,
SftpErrorDataHandler
The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored
errorDataHandler
)

Create an SFTP client from this session.

public SftpClient

Returns:

The created SftpClient instance
createSftpClient
(ClientSession
The ClientSession to which the SFTP client should be attached
session
,
SftpVersionSelector
The SftpVersionSelector to use in order to negotiate the SFTP version
selector
,
SftpErrorDataHandler
The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored
errorDataHandler
)

public default SftpFileSystem
public default SftpFileSystem
createSftpFileSystem(ClientSession session, int version)

public default SftpFileSystem
public default SftpFileSystem
createSftpFileSystem(ClientSession session, int version, int readBufferSize, int writeBufferSize)

public default SftpFileSystem
createSftpFileSystem(ClientSession session, int readBufferSize, int writeBufferSize)

public default SftpFileSystem
createSftpFileSystem(ClientSession session, SftpVersionSelector selector, int readBufferSize, int writeBufferSize)

public SftpFileSystem

Returns:

The created SftpFileSystem instance
createSftpFileSystem
(ClientSession
The ClientSession to which the SFTP client backing the file system should be attached
session
,
SftpVersionSelector
The SftpVersionSelector to use in order to negotiate the SFTP version
selector
,
SftpErrorDataHandler
The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored
errorDataHandler
,
int
Default I/O read buffer size
readBufferSize
,
int
Default I/O write buffer size
writeBufferSize
)

public static SftpClientFactory

Method Detail

createSftpClientback to summary
public default SftpClient createSftpClient(ClientSession session) throws IOException

Create an SFTP client from this session.

Parameters
session:ClientSession

The ClientSession to be used for creating the SFTP client

Returns:SftpClient

The created SftpClient

Exceptions
IOException:
if failed to create the client
createSftpClientback to summary
public default SftpClient createSftpClient(ClientSession session, int version) throws IOException

Creates an SFTP client using the specified version

Parameters
session:ClientSession

The ClientSession to be used for creating the SFTP client

version:int

The version to use - Note: if the specified version is not supported by the server then an exception will occur

Returns:SftpClient

The created SftpClient

Exceptions
IOException:
If failed to create the client or use the specified version
createSftpClientback to summary
public default SftpClient createSftpClient(ClientSession session, SftpVersionSelector selector) throws IOException
Parameters
session:ClientSession

The ClientSession to which the SFTP client should be attached

selector:SftpVersionSelector

The SftpVersionSelector to use in order to negotiate the SFTP version

Returns:SftpClient

The created SftpClient instance

Exceptions
IOException:
If failed to create the client
createSftpClientback to summary
public default SftpClient createSftpClient(ClientSession session, SftpErrorDataHandler errorDataHandler) throws IOException

Create an SFTP client from this session.

Parameters
session:ClientSession

The ClientSession to be used for creating the SFTP client

errorDataHandler:SftpErrorDataHandler

The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored

Returns:SftpClient

The created SftpClient

Exceptions
IOException:
if failed to create the client
createSftpClientback to summary
public SftpClient createSftpClient(ClientSession session, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler) throws IOException
Parameters
session:ClientSession

The ClientSession to which the SFTP client should be attached

selector:SftpVersionSelector

The SftpVersionSelector to use in order to negotiate the SFTP version

errorDataHandler:SftpErrorDataHandler

The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored

Returns:SftpClient

The created SftpClient instance

Exceptions
IOException:
If failed to create the client
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session) throws IOException
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session, int version) throws IOException
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector) throws IOException
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session, int version, int readBufferSize, int writeBufferSize) throws IOException
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session, int readBufferSize, int writeBufferSize) throws IOException
createSftpFileSystemback to summary
public default SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector, int readBufferSize, int writeBufferSize) throws IOException
createSftpFileSystemback to summary
public SftpFileSystem createSftpFileSystem(ClientSession session, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler, int readBufferSize, int writeBufferSize) throws IOException
Parameters
session:ClientSession

The ClientSession to which the SFTP client backing the file system should be attached

selector:SftpVersionSelector

The SftpVersionSelector to use in order to negotiate the SFTP version

errorDataHandler:SftpErrorDataHandler

The SftpErrorDataHandler to handle incoming data through the error stream - if null the data is silently ignored

readBufferSize:int

Default I/O read buffer size

writeBufferSize:int

Default I/O write buffer size

Returns:SftpFileSystem

The created SftpFileSystem instance

Exceptions
IOException:
If failed to create the instance
instanceback to summary
public static SftpClientFactory instance()