Top Fields Constructors Methods
org.apache.sshd.client.simple

public abstract Class AbstractSimpleClientSessionCreator

extends AbstractSimpleClient
implements ClientSessionCreator
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.session.ClientSessionCreator
Imports
java.io.IOException, java.net.SocketAddress, java.nio.channels.Channel, java.security.KeyPair, java.util.Objects, org.apache.sshd.client.config.hosts.HostConfigEntry, org.apache.sshd.client.future.AuthFuture, .ConnectFuture, org.apache.sshd.client.session.ClientSession, .ClientSessionCreator, org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.util.ExceptionUtils, .ValidateUtils

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private long
private long

Constructor Summary

AccessConstructor and Description
protected
protected
AbstractSimpleClientSessionCreator(long connTimeout, long authTimeout)

Method Summary

Modifier and TypeMethod and Description
protected ClientSession
authSession(ConnectFuture future, String password)

protected ClientSession
authSession(ConnectFuture future, KeyPair identity)

protected ClientSession
authSession(ClientSession clientSession)

public long
public long
protected ClientSession
loginSession(ConnectFuture future, String password)

protected ClientSession
public ClientSession
sessionLogin(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
String
Password
password
)

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

public ClientSession
sessionLogin(SocketAddress
The target SocketAddress
target
,
String
Username
username
,
KeyPair
The KeyPair identity
identity
)

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

public ClientSession
sessionLogin(String
The target uri
uri
,
String
Password
password
)

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

public ClientSession
sessionLogin(String
The target uri
uri
,
KeyPair
The KeyPair identity
identity
)

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

public void
setAuthenticationTimeout(long
Requested authentication timeout (msec.) - always positive
timeout
)

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.setAuthenticationTimeout.

public void
setConnectTimeout(long
Requested connect timeout (msec.) - always positive
timeout
)

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.setConnectTimeout.

public static SimpleClient

Returns:

The SimpleClient wrapper

Note

closing the wrapper also closes the underlying sessions creator.

wrap
(ClientSessionCreator
The ClientSessionCreator - never null
creator
,
Channel
The Channel representing the creator for relaying isOpen() and close() calls
channel
)

Wraps an existing ClientSessionCreator into a SimpleClient

Field Detail

authenticateTimeoutback to summary
private long authenticateTimeout
connectTimeoutback to summary
private long connectTimeout

Constructor Detail

AbstractSimpleClientSessionCreatorback to summary
protected AbstractSimpleClientSessionCreator()
AbstractSimpleClientSessionCreatorback to summary
protected AbstractSimpleClientSessionCreator(long connTimeout, long authTimeout)

Method Detail

authSessionback to summary
protected ClientSession authSession(ConnectFuture future, String password) throws IOException
authSessionback to summary
protected ClientSession authSession(ConnectFuture future, KeyPair identity) throws IOException
authSessionback to summary
protected ClientSession authSession(ClientSession clientSession) throws IOException
getAuthenticationTimeoutback to summary
public long getAuthenticationTimeout()

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.getAuthenticationTimeout.

Returns:long

Doc from org.apache.sshd.client.simple.SimpleClientConfigurator.getAuthenticationTimeout.

Current authentication timeout (msec.) - always positive

Annotations
@Override
getConnectTimeoutback to summary
public long getConnectTimeout()

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.getConnectTimeout.

Returns:long

Doc from org.apache.sshd.client.simple.SimpleClientConfigurator.getConnectTimeout.

Current connect timeout (msec.) - always positive

Annotations
@Override
loginSessionback to summary
protected ClientSession loginSession(ConnectFuture future, String password) throws IOException
loginSessionback to summary
protected ClientSession loginSession(ConnectFuture future, KeyPair identity) throws IOException
sessionLoginback to summary
public ClientSession sessionLogin(SocketAddress target, String username, String password) throws IOException

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Doc from org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

password:String

Password

Returns:ClientSession

Created ClientSession

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(SocketAddress target, String username, KeyPair identity) throws IOException

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Doc from org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

Parameters
target:SocketAddress

The target SocketAddress

username:String

Username

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(String uri, String password) throws IOException

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Doc from org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

Parameters
uri:String

The target uri

password:String

Password

Returns:ClientSession

Created ClientSession

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
sessionLoginback to summary
public ClientSession sessionLogin(String uri, KeyPair identity) throws IOException

Implements org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Doc from org.apache.sshd.client.simple.SimpleSessionClient.sessionLogin.

Creates a session and logs in using the provided credentials

Parameters
uri:String

The target uri

identity:KeyPair

The KeyPair identity

Returns:ClientSession

Created ClientSession

Annotations
@Override
Exceptions
IOException:
If failed to login or authenticate
setAuthenticationTimeoutback to summary
public void setAuthenticationTimeout(long timeout)

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.setAuthenticationTimeout.

Parameters
timeout:long

Doc from org.apache.sshd.client.simple.SimpleClientConfigurator.setAuthenticationTimeout.

Requested authentication timeout (msec.) - always positive

Annotations
@Override
setConnectTimeoutback to summary
public void setConnectTimeout(long timeout)

Implements org.apache.sshd.client.simple.SimpleClientConfigurator.setConnectTimeout.

Parameters
timeout:long

Doc from org.apache.sshd.client.simple.SimpleClientConfigurator.setConnectTimeout.

Requested connect timeout (msec.) - always positive

Annotations
@Override
wrapback to summary
public static SimpleClient wrap(ClientSessionCreator creator, Channel channel)

Wraps an existing ClientSessionCreator into a SimpleClient

Parameters
creator:ClientSessionCreator

The ClientSessionCreator - never null

channel:Channel

The Channel representing the creator for relaying isOpen() and close() calls

Returns:SimpleClient

The SimpleClient wrapper

Note

closing the wrapper also closes the underlying sessions creator.

Annotations
@SuppressWarnings:checkstyle:anoninnerlength