Package org.apache.sshd.client.session
Interface ClientSessionCreator
- All Known Subinterfaces:
ClientFactoryManager
- All Known Implementing Classes:
AbstractSimpleClientSessionCreator,SshClient
public interface ClientSessionCreator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttributeRepository.AttributeKey<SshdSocketAddress> -
Method Summary
Modifier and TypeMethodDescriptionResolves the effectiveHostConfigEntryand connects to itdefault ConnectFutureResolves 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 itconnect(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 itconnect(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) connect(HostConfigEntry hostConfig, AttributeRepository context, SocketAddress localAddress)
-
Field Details
-
TARGET_SERVER
-
-
Method Details
-
connect
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
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
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
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
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
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
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
- 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
-