Interface ClientSessionCreator

All Known Subinterfaces:
ClientFactoryManager
All Known Implementing Classes:
AbstractSimpleClientSessionCreator, SshClient

public interface ClientSessionCreator
Author:
Apache MINA SSHD Project
  • Field Details

    • TARGET_SERVER

      static final org.apache.sshd.common.AttributeRepository.AttributeKey<org.apache.sshd.common.util.net.SshdSocketAddress> TARGET_SERVER
  • Method Details

    • connect

      ConnectFuture connect(String uri) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      uri - The server uri to connect to
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
      See Also:
    • connect

      default ConnectFuture connect(String username, String host, int port) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      host - The target host name/address - never null/empty
      port - The target port
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
      See Also:
    • connect

      default ConnectFuture connect(String username, String host, int port, org.apache.sshd.common.AttributeRepository context) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      host - The target host name/address - never null/empty
      port - The target port
      context - An optional "context" to be attached to the established session if successfully connected
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
    • connect

      default ConnectFuture connect(String username, String host, int port, SocketAddress localAddress) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      host - The target host name/address - never null/empty
      port - The target port
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
      See Also:
    • connect

      ConnectFuture connect(String username, String host, int port, org.apache.sshd.common.AttributeRepository context, SocketAddress localAddress) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      host - The target host name/address - never null/empty
      port - The target port
      context - An optional "context" to be attached to the established session if successfully connected
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
    • connect

      default ConnectFuture connect(String username, SocketAddress address) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      address - The intended SocketAddress - never null. If this is an InetSocketAddress then the effective HostConfigEntry is resolved and used.
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
      See Also:
    • connect

      default ConnectFuture connect(String username, SocketAddress address, org.apache.sshd.common.AttributeRepository context) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      address - The intended SocketAddress - never null. If this is an InetSocketAddress then the effective HostConfigEntry is resolved and used.
      context - An optional "context" to be attached to the established session if successfully connected
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
    • connect

      default ConnectFuture connect(String username, SocketAddress targetAddress, SocketAddress localAddress) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      targetAddress - The intended target SocketAddress - never null. If this is an InetSocketAddress then the effective HostConfigEntry is resolved and used.
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
      See Also:
    • connect

      ConnectFuture connect(String username, SocketAddress targetAddress, org.apache.sshd.common.AttributeRepository context, SocketAddress localAddress) throws IOException
      Resolves the effective HostConfigEntry and connects to it
      Parameters:
      username - The intended username
      targetAddress - The intended target SocketAddress - never null. If this is an InetSocketAddress then the effective HostConfigEntry is resolved and used.
      context - An optional "context" to be attached to the established session if successfully connected
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to resolve the effective target or connect to it
    • connect

      default ConnectFuture connect(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig) throws IOException
      Parameters:
      hostConfig - The effective HostConfigEntry to connect to - never null
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to create the connection future
    • connect

      default ConnectFuture connect(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig, org.apache.sshd.common.AttributeRepository context) throws IOException
      Parameters:
      hostConfig - The effective HostConfigEntry to connect to - never null
      context - An optional "context" to be attached to the established session if successfully connected
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to create the connection future
    • connect

      default ConnectFuture connect(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig, SocketAddress localAddress) throws IOException
      Parameters:
      hostConfig - The effective HostConfigEntry to connect to - never null
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to create the connection future
    • connect

      ConnectFuture connect(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig, org.apache.sshd.common.AttributeRepository context, SocketAddress localAddress) throws IOException
      Parameters:
      hostConfig - The effective HostConfigEntry to connect to - never null
      context - An optional "context" to be attached to the established session if successfully connected
      localAddress - The local address to use - if null an automatic ephemeral port and bind address is used
      Returns:
      A ConnectFuture
      Throws:
      IOException - If failed to create the connection future