public class SimpleSftpClientImpl extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements SimpleSftpClient
log| Constructor and Description |
|---|
SimpleSftpClientImpl() |
SimpleSftpClientImpl(SimpleClient client) |
SimpleSftpClientImpl(SimpleClient client,
SftpClientFactory sftpClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected SftpClient |
createSftpClient(ClientSession session) |
protected SftpClient |
createSftpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) |
SimpleClient |
getClient() |
SftpClientFactory |
getSftpClientFactory() |
boolean |
isOpen() |
void |
setClient(SimpleClient client) |
void |
setSftpClientFactory(SftpClientFactory sftpClientFactory) |
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
|
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnpublic SimpleSftpClientImpl()
public SimpleSftpClientImpl(SimpleClient client)
public SimpleSftpClientImpl(SimpleClient client, SftpClientFactory sftpClientFactory)
public SimpleClient getClient()
public void setClient(SimpleClient client)
public SftpClientFactory getSftpClientFactory()
public void setSftpClientFactory(SftpClientFactory sftpClientFactory)
public SftpClient sftpLogin(SocketAddress target, String username, String password) throws IOException
SimpleSftpClientsftpLogin in interface SimpleSftpClienttarget - The target SocketAddressusername - 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
SimpleSftpClientsftpLogin in interface SimpleSftpClienttarget - The target SocketAddressusername - Usernameidentity - The KeyPair identitySftpClient - Note: closing the client also closes its underlying
sessionIOException - If failed to login or authenticateprotected SftpClient createSftpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) throws IOException
IOExceptionprotected SftpClient createSftpClient(ClientSession session) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.