Package org.apache.sshd.client.session
Interface ClientSessionCreator
-
- All Known Subinterfaces:
ClientFactoryManager
- All Known Implementing Classes:
AbstractSimpleClientSessionCreator,SshClient
public interface ClientSessionCreator- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static AttributeRepository.AttributeKey<SshdSocketAddress>TARGET_SERVER
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConnectFutureconnect(String uri)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, String host, int port)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, String host, int port, SocketAddress localAddress)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, String host, int port, AttributeRepository context)Resolves the effectiveHostConfigEntryand connects to itConnectFutureconnect(String username, String host, int port, AttributeRepository context, SocketAddress localAddress)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, SocketAddress address)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, SocketAddress targetAddress, SocketAddress localAddress)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(String username, SocketAddress address, AttributeRepository context)Resolves the effectiveHostConfigEntryand connects to itConnectFutureconnect(String username, SocketAddress targetAddress, AttributeRepository context, SocketAddress localAddress)Resolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureconnect(HostConfigEntry hostConfig)default ConnectFutureconnect(HostConfigEntry hostConfig, SocketAddress localAddress)default ConnectFutureconnect(HostConfigEntry hostConfig, AttributeRepository context)ConnectFutureconnect(HostConfigEntry hostConfig, AttributeRepository context, SocketAddress localAddress)
-
-
-
Field Detail
-
TARGET_SERVER
static final AttributeRepository.AttributeKey<SshdSocketAddress> TARGET_SERVER
-
-
Method Detail
-
connect
ConnectFuture connect(String uri) throws IOException
Resolves the effectiveHostConfigEntryand 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(HostConfigEntry)
-
connect
default ConnectFuture connect(String username, String host, int port) throws IOException
Resolves the effectiveHostConfigEntryand 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 effectiveHostConfigEntryand 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 effectiveHostConfigEntryand connects to it- Parameters:
username- The intended usernamehost- The target host name/address - nevernull/emptyport- The target portlocalAddress- The local address to use - ifnullan 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 effectiveHostConfigEntryand 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 - ifnullan 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 effectiveHostConfigEntryand connects to it- Parameters:
username- The intended usernameaddress- The intendedSocketAddress- nevernull. If this is anInetSocketAddressthen the effectiveHostConfigEntryis 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 effectiveHostConfigEntryand connects to it- Parameters:
username- The intended usernameaddress- The intendedSocketAddress- nevernull. If this is anInetSocketAddressthen the effectiveHostConfigEntryis 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 effectiveHostConfigEntryand connects to it- Parameters:
username- The intended usernametargetAddress- The intended targetSocketAddress- nevernull. If this is anInetSocketAddressthen the effectiveHostConfigEntryis resolved and used.localAddress- The local address to use - ifnullan 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 effectiveHostConfigEntryand connects to it- Parameters:
username- The intended usernametargetAddress- The intended targetSocketAddress- nevernull. If this is anInetSocketAddressthen the effectiveHostConfigEntryis resolved and used.context- An optional "context" to be attached to the established session if successfully connectedlocalAddress- The local address to use - ifnullan 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 effectiveHostConfigEntryto 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 effectiveHostConfigEntryto connect to - nevernullcontext- 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 effectiveHostConfigEntryto connect to - nevernulllocalAddress- The local address to use - ifnullan 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 effectiveHostConfigEntryto connect to - nevernullcontext- An optional "context" to be attached to the established session if successfully connectedlocalAddress- The local address to use - ifnullan automatic ephemeral port and bind address is used- Returns:
- A
ConnectFuture - Throws:
IOException- If failed to create the connection future
-
-