Interface SimpleSftpClient

  • All Superinterfaces:
    java.lang.AutoCloseable, java.nio.channels.Channel, java.io.Closeable
    All Known Implementing Classes:
    SimpleSftpClientImpl

    public interface SimpleSftpClient
    extends java.nio.channels.Channel
    A simplified synchronous API for obtaining SFTP sessions.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default SftpClient sftpLogin​(java.lang.String host, int port, java.lang.String username, java.lang.String password)
      Creates an SFTP session using the provided credentials
      default SftpClient sftpLogin​(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity)
      Creates an SFTP session using the provided credentials
      default SftpClient sftpLogin​(java.lang.String host, java.lang.String username, java.lang.String password)
      Creates an SFTP session on the default port and logs in using the provided credentials
      default SftpClient sftpLogin​(java.lang.String host, java.lang.String username, java.security.KeyPair identity)
      Creates an SFTP session on the default port and logs in using the provided credentials
      default SftpClient sftpLogin​(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password)
      Creates an SFTP session using the provided credentials
      default SftpClient sftpLogin​(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity)
      Creates an SFTP session using the provided credentials
      default SftpClient sftpLogin​(java.net.InetAddress host, java.lang.String username, java.lang.String password)
      Creates an SFTP session on the default port and logs in using the provided credentials
      default SftpClient sftpLogin​(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity)
      Creates an SFTP session on the default port and logs in using the provided credentials
      SftpClient sftpLogin​(java.net.SocketAddress target, java.lang.String username, java.lang.String password)
      Creates an SFTP session using the provided credentials
      SftpClient sftpLogin​(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity)
      Creates an SFTP session using the provided credentials
      • Methods inherited from interface java.nio.channels.Channel

        close, isOpen
    • Method Detail

      • sftpLogin

        default SftpClient sftpLogin​(java.lang.String host,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws java.io.IOException
        Creates an SFTP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host name or address
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.lang.String host,
                                     int port,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        host - The target host name or address
        port - The target port
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.lang.String host,
                                     java.lang.String username,
                                     java.security.KeyPair identity)
                              throws java.io.IOException
        Creates an SFTP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host name or address
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.lang.String host,
                                     int port,
                                     java.lang.String username,
                                     java.security.KeyPair identity)
                              throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        host - The target host name or address
        port - The target port
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.net.InetAddress host,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws java.io.IOException
        Creates an SFTP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host InetAddress
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.net.InetAddress host,
                                     int port,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        host - The target host InetAddress
        port - The target port
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.net.InetAddress host,
                                     java.lang.String username,
                                     java.security.KeyPair identity)
                              throws java.io.IOException
        Creates an SFTP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host InetAddress
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        default SftpClient sftpLogin​(java.net.InetAddress host,
                                     int port,
                                     java.lang.String username,
                                     java.security.KeyPair identity)
                              throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        host - The target host InetAddress
        port - The target port
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        SftpClient sftpLogin​(java.net.SocketAddress target,
                             java.lang.String username,
                             java.lang.String password)
                      throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        target - The target SocketAddress
        username - Username
        password - Password
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sftpLogin

        SftpClient sftpLogin​(java.net.SocketAddress target,
                             java.lang.String username,
                             java.security.KeyPair identity)
                      throws java.io.IOException
        Creates an SFTP session using the provided credentials
        Parameters:
        target - The target SocketAddress
        username - Username
        identity - The KeyPair identity
        Returns:
        Created SftpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate