Package org.apache.sshd.client.session
Interface ClientSessionCreator
-
- All Known Implementing Classes:
AbstractSimpleClientSessionCreator
,SshClient
public interface ClientSessionCreator
- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ConnectFuture
connect(String username, String host, int port)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(String username, String host, int port, SocketAddress localAddress)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(String username, String host, int port, AttributeRepository context)
Resolves the effectiveHostConfigEntry
and connects to itConnectFuture
connect(String username, String host, int port, AttributeRepository context, SocketAddress localAddress)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(String username, SocketAddress address)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(String username, SocketAddress targetAddress, SocketAddress localAddress)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(String username, SocketAddress address, AttributeRepository context)
Resolves the effectiveHostConfigEntry
and connects to itConnectFuture
connect(String username, SocketAddress targetAddress, AttributeRepository context, SocketAddress localAddress)
Resolves the effectiveHostConfigEntry
and connects to itdefault ConnectFuture
connect(HostConfigEntry hostConfig)
default ConnectFuture
connect(HostConfigEntry hostConfig, SocketAddress localAddress)
default ConnectFuture
connect(HostConfigEntry hostConfig, AttributeRepository context)
ConnectFuture
connect(HostConfigEntry hostConfig, AttributeRepository context, SocketAddress localAddress)
-
-
-
Method Detail
-
connect
default ConnectFuture connect(String username, String host, int port) throws IOException
Resolves the effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernamehost
- The target host name/address - nevernull
/emptyport
- The target port- Returns:
- A
ConnectFuture
- Throws:
IOException
- If failed to resolve the effective target or connect to it- See Also:
connect(HostConfigEntry)
-
connect
default ConnectFuture connect(String username, String host, int port, AttributeRepository context) throws IOException
Resolves the effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernamehost
- The target host name/address - nevernull
/emptyport
- The target portcontext
- 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 effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernamehost
- The target host name/address - nevernull
/emptyport
- The target portlocalAddress
- The local address to use - ifnull
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(HostConfigEntry)
-
connect
ConnectFuture connect(String username, String host, int port, AttributeRepository context, SocketAddress localAddress) throws IOException
Resolves the effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernamehost
- The target host name/address - nevernull
/emptyport
- The target portcontext
- An optional "context" to be attached to the established session if successfully connectedlocalAddress
- The local address to use - ifnull
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 effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernameaddress
- The intendedSocketAddress
- nevernull
. If this is anInetSocketAddress
then the effectiveHostConfigEntry
is resolved and used.- Returns:
- A
ConnectFuture
- Throws:
IOException
- If failed to resolve the effective target or connect to it- See Also:
connect(HostConfigEntry)
-
connect
default ConnectFuture connect(String username, SocketAddress address, AttributeRepository context) throws IOException
Resolves the effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernameaddress
- The intendedSocketAddress
- nevernull
. If this is anInetSocketAddress
then the effectiveHostConfigEntry
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 effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernametargetAddress
- The intended targetSocketAddress
- nevernull
. If this is anInetSocketAddress
then the effectiveHostConfigEntry
is resolved and used.localAddress
- The local address to use - ifnull
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(HostConfigEntry)
-
connect
ConnectFuture connect(String username, SocketAddress targetAddress, AttributeRepository context, SocketAddress localAddress) throws IOException
Resolves the effectiveHostConfigEntry
and connects to it- Parameters:
username
- The intended usernametargetAddress
- The intended targetSocketAddress
- nevernull
. If this is anInetSocketAddress
then the effectiveHostConfigEntry
is resolved and used.context
- An optional "context" to be attached to the established session if successfully connectedlocalAddress
- The local address to use - ifnull
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(HostConfigEntry hostConfig) throws IOException
- Parameters:
hostConfig
- The effectiveHostConfigEntry
to connect to - nevernull
- Returns:
- A
ConnectFuture
- Throws:
IOException
- If failed to create the connection future
-
connect
default ConnectFuture connect(HostConfigEntry hostConfig, AttributeRepository context) throws IOException
- Parameters:
hostConfig
- The effectiveHostConfigEntry
to connect to - nevernull
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(HostConfigEntry hostConfig, SocketAddress localAddress) throws IOException
- Parameters:
hostConfig
- The effectiveHostConfigEntry
to connect to - nevernull
localAddress
- The local address to use - ifnull
an automatic ephemeral port and bind address is used- Returns:
- A
ConnectFuture
- Throws:
IOException
- If failed to create the connection future
-
connect
ConnectFuture connect(HostConfigEntry hostConfig, AttributeRepository context, SocketAddress localAddress) throws IOException
- Parameters:
hostConfig
- The effectiveHostConfigEntry
to connect to - nevernull
context
- An optional "context" to be attached to the established session if successfully connectedlocalAddress
- The local address to use - ifnull
an automatic ephemeral port and bind address is used- Returns:
- A
ConnectFuture
- Throws:
IOException
- If failed to create the connection future
-
-