Top Fields Methods
org.apache.sshd.client.session

public Interface ClientSessionCreator

Known Direct Subinterfaces
org.apache.sshd.client.ClientFactoryManager
Known Direct Implementers
org.apache.sshd.client.simple.AbstractSimpleClientSessionCreator
Imports
java.io.IOException, java.net.SocketAddress, org.apache.sshd.client.config.hosts.HostConfigEntry, org.apache.sshd.client.future.ConnectFuture, org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.util.net.SshdSocketAddress

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final AttributeRepository.AttributeKey<SshdSocketAddress>

Method Summary

Modifier and TypeMethod and Description
public ConnectFuture

Returns:

A ConnectFuture
connect
(String
The server uri to connect to
uri
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
String
The target host name/address - never null/empty
host
,
int
The target port
port
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
String
The target host name/address - never null/empty
host
,
int
The target port
port
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
String
The target host name/address - never null/empty
host
,
int
The target port
port
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Resolves the effective HostConfigEntry and connects to it

public ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
String
The target host name/address - never null/empty
host
,
int
The target port
port
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
SocketAddress
The intended SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.
address
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
SocketAddress
The intended SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.
address
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
SocketAddress
The intended target SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.
targetAddress
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Resolves the effective HostConfigEntry and connects to it

public ConnectFuture

Returns:

A ConnectFuture
connect
(String
The intended username
username
,
SocketAddress
The intended target SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.
targetAddress
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Resolves the effective HostConfigEntry and connects to it

public default ConnectFuture

Returns:

A ConnectFuture
connect
(HostConfigEntry
The effective HostConfigEntry to connect to - never null
hostConfig
)

public default ConnectFuture

Returns:

A ConnectFuture
connect
(HostConfigEntry
The effective HostConfigEntry to connect to - never null
hostConfig
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
)

public default ConnectFuture

Returns:

A ConnectFuture
connect
(HostConfigEntry
The effective HostConfigEntry to connect to - never null
hostConfig
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

public ConnectFuture

Returns:

A ConnectFuture
connect
(HostConfigEntry
The effective HostConfigEntry to connect to - never null
hostConfig
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Field Detail

TARGET_SERVERback to summary
public static final AttributeRepository.AttributeKey<SshdSocketAddress> TARGET_SERVER

Method Detail

connectback to summary
public ConnectFuture connect(String uri) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
uri:String

The server uri to connect to

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
See Also
connect(HostConfigEntry)
connectback to summary
public default ConnectFuture connect(String username, String host, int port) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

host:String

The target host name/address - never null/empty

port:int

The target port

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
See Also
connect(HostConfigEntry)
connectback to summary
public default ConnectFuture connect(String username, String host, int port, AttributeRepository context) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

host:String

The target host name/address - never null/empty

port:int

The target port

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
connectback to summary
public default ConnectFuture connect(String username, String host, int port, SocketAddress localAddress) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

host:String

The target host name/address - never null/empty

port:int

The target port

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
See Also
connect(HostConfigEntry)
connectback to summary
public ConnectFuture connect(String username, String host, int port, AttributeRepository context, SocketAddress localAddress) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

host:String

The target host name/address - never null/empty

port:int

The target port

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
connectback to summary
public default ConnectFuture connect(String username, SocketAddress address) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

address:SocketAddress

The intended SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
See Also
connect(HostConfigEntry)
connectback to summary
public default ConnectFuture connect(String username, SocketAddress address, AttributeRepository context) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

address:SocketAddress

The intended SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
connectback to summary
public default ConnectFuture connect(String username, SocketAddress targetAddress, SocketAddress localAddress) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

targetAddress:SocketAddress

The intended target SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
See Also
connect(HostConfigEntry)
connectback to summary
public ConnectFuture connect(String username, SocketAddress targetAddress, AttributeRepository context, SocketAddress localAddress) throws IOException

Resolves the effective HostConfigEntry and connects to it

Parameters
username:String

The intended username

targetAddress:SocketAddress

The intended target SocketAddress - never null. If this is an java.net.InetSocketAddress then the effective HostConfigEntry is resolved and used.

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to resolve the effective target or connect to it
connectback to summary
public default ConnectFuture connect(HostConfigEntry hostConfig) throws IOException
Parameters
hostConfig:HostConfigEntry

The effective HostConfigEntry to connect to - never null

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to create the connection future
connectback to summary
public default ConnectFuture connect(HostConfigEntry hostConfig, AttributeRepository context) throws IOException
Parameters
hostConfig:HostConfigEntry

The effective HostConfigEntry to connect to - never null

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to create the connection future
connectback to summary
public default ConnectFuture connect(HostConfigEntry hostConfig, SocketAddress localAddress) throws IOException
Parameters
hostConfig:HostConfigEntry

The effective HostConfigEntry to connect to - never null

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to create the connection future
connectback to summary
public ConnectFuture connect(HostConfigEntry hostConfig, AttributeRepository context, SocketAddress localAddress) throws IOException
Parameters
hostConfig:HostConfigEntry

The effective HostConfigEntry to connect to - never null

context:AttributeRepository

An optional "context" to be attached to the established session if successfully connected

localAddress:SocketAddress

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:ConnectFuture

A ConnectFuture

Exceptions
IOException:
If failed to create the connection future