public abstract class AbstractSimpleClient extends AbstractLoggingBean implements SimpleClient
log
DEFAULT_AUTHENTICATION_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT
Modifier | Constructor and Description |
---|---|
protected |
AbstractSimpleClient() |
Modifier and Type | Method and Description |
---|---|
protected CloseableScpClient |
createScpClient(ClientSession session) |
protected SftpClient |
createSftpClient(ClientSession session) |
protected SftpClient |
createSftpClient(ClientSession session,
SftpClient client) |
CloseableScpClient |
scpLogin(InetAddress host,
int port,
String username,
KeyPair identity)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(InetAddress host,
int port,
String username,
String password)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(InetAddress host,
String username,
KeyPair identity)
Creates an SCP session on the default port and logs in using the provided credentials
|
CloseableScpClient |
scpLogin(InetAddress host,
String username,
String password)
Creates an SCP session on the default port and logs in using the provided credentials
|
CloseableScpClient |
scpLogin(SocketAddress target,
String username,
KeyPair identity)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(SocketAddress target,
String username,
String password)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(String host,
int port,
String username,
KeyPair identity)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(String host,
int port,
String username,
String password)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(String host,
String username,
KeyPair identity)
Creates an SCP session on the default port and logs in using the provided credentials
|
CloseableScpClient |
scpLogin(String host,
String username,
String password)
Creates an SCP session on the default port and logs in using the provided credentials
|
ClientSession |
sessionLogin(InetAddress host,
int port,
String username,
KeyPair identity)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(InetAddress host,
int port,
String username,
String password)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(InetAddress host,
String username,
KeyPair identity)
Creates a session on the default port and logs in using the provided credentials
|
ClientSession |
sessionLogin(InetAddress host,
String username,
String password)
Creates a session on the default port and logs in using the provided credentials
|
ClientSession |
sessionLogin(String host,
int port,
String username,
KeyPair identity)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(String host,
int port,
String username,
String password)
Creates a session and logs in using the provided credentials
|
ClientSession |
sessionLogin(String host,
String username,
KeyPair identity)
Creates a session on the default port and logs in using the provided credentials
|
ClientSession |
sessionLogin(String host,
String username,
String password)
Creates a session on the default port and logs in using the provided credentials
|
SftpClient |
sftpLogin(InetAddress host,
int port,
String username,
KeyPair identity)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(InetAddress host,
int port,
String username,
String password)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(InetAddress host,
String username,
KeyPair identity)
Creates an SFTP session on the default port and logs in using the provided credentials
|
SftpClient |
sftpLogin(InetAddress host,
String username,
String password)
Creates an SFTP session on the default port and logs in using the provided credentials
|
SftpClient |
sftpLogin(SocketAddress target,
String username,
KeyPair identity)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(SocketAddress target,
String username,
String password)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(String host,
int port,
String username,
KeyPair identity)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(String host,
int port,
String username,
String password)
Creates an SFTP session using the provided credentials
|
SftpClient |
sftpLogin(String host,
String username,
KeyPair identity)
Creates an SFTP session on the default port and logs in using the provided credentials
|
SftpClient |
sftpLogin(String host,
String username,
String password)
Creates an SFTP session on the default port and logs in using the provided credentials
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sessionLogin, sessionLogin
getAuthenticationTimeout, getConnectTimeout, setAuthenticationTimeout, setConnectTimeout
public SftpClient sftpLogin(String host, String username, String password) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host name or addressusername
- Usernamepassword
- PasswordSftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(String host, int port, String username, String password) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host name or addressport
- The target portusername
- Usernamepassword
- PasswordSftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(String host, String username, KeyPair identity) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host name or addressusername
- Usernameidentity
- The KeyPair
identitySftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(String host, int port, String username, KeyPair identity) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host name or addressport
- The target portusername
- Usernameidentity
- The KeyPair
identitySftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(InetAddress host, String username, String password) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host InetAddress
username
- Usernamepassword
- PasswordSftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(InetAddress host, int port, String username, String password) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host InetAddress
port
- The target portusername
- Usernamepassword
- PasswordSftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(InetAddress host, String username, KeyPair identity) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host InetAddress
username
- Usernameidentity
- The KeyPair
identitySftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
host
- The target host InetAddress
port
- The target portusername
- Usernameidentity
- The KeyPair
identitySftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(SocketAddress target, String username, String password) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
target
- The target SocketAddress
username
- Usernamepassword
- PasswordSftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic SftpClient sftpLogin(SocketAddress target, String username, KeyPair identity) throws IOException
SimpleSftpClient
sftpLogin
in interface SimpleSftpClient
target
- The target SocketAddress
username
- Usernameidentity
- The KeyPair
identitySftpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticateprotected SftpClient createSftpClient(ClientSession session) throws IOException
IOException
protected SftpClient createSftpClient(ClientSession session, SftpClient client) throws IOException
IOException
public CloseableScpClient scpLogin(String host, String username, String password) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host name or addressusername
- Usernamepassword
- PasswordCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(String host, int port, String username, String password) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host name or addressport
- The target portusername
- Usernamepassword
- PasswordCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(String host, String username, KeyPair identity) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host name or addressusername
- Usernameidentity
- The KeyPair
identityCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(String host, int port, String username, KeyPair identity) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host name or addressport
- The target portusername
- Usernameidentity
- The KeyPair
identityCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(InetAddress host, String username, String password) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host InetAddress
username
- Usernamepassword
- PasswordCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(InetAddress host, int port, String username, String password) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host InetAddress
port
- The target portusername
- Usernamepassword
- PasswordCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(InetAddress host, String username, KeyPair identity) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host InetAddress
username
- Usernameidentity
- The KeyPair
identityCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
host
- The target host InetAddress
port
- The target portusername
- Usernameidentity
- The KeyPair
identityCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
target
- The target SocketAddress
username
- Usernamepassword
- PasswordCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticatepublic CloseableScpClient scpLogin(SocketAddress target, String username, KeyPair identity) throws IOException
SimpleScpClient
scpLogin
in interface SimpleScpClient
target
- The target SocketAddress
username
- Usernameidentity
- The KeyPair
identityCloseableScpClient
- Note: closing the client also closes its
underlying sessionIOException
- If failed to login or authenticateprotected CloseableScpClient createScpClient(ClientSession session) throws IOException
IOException
public ClientSession sessionLogin(String host, String username, String password) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host name or addressusername
- Usernamepassword
- PasswordClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(String host, String username, KeyPair identity) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host name or addressusername
- Usernameidentity
- The KeyPair
identityClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(InetAddress host, String username, String password) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host InetAddress
username
- Usernamepassword
- PasswordClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(InetAddress host, String username, KeyPair identity) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host InetAddress
username
- Usernameidentity
- The KeyPair
identityClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(String host, int port, String username, String password) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host name or addressport
- The target portusername
- Usernamepassword
- PasswordClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(InetAddress host, int port, String username, String password) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host InetAddress
port
- The target portusername
- Usernamepassword
- PasswordClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(String host, int port, String username, KeyPair identity) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host name or addressport
- The target portusername
- Usernameidentity
- The KeyPair
identityClientSession
IOException
- If failed to login or authenticatepublic ClientSession sessionLogin(InetAddress host, int port, String username, KeyPair identity) throws IOException
SimpleSessionClient
sessionLogin
in interface SimpleSessionClient
host
- The target host InetAddress
port
- The target portusername
- Usernameidentity
- The KeyPair
identityClientSession
IOException
- If failed to login or authenticateCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.