public class SimpleScpClientImpl extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements SimpleScpClient
log| Constructor and Description |
|---|
SimpleScpClientImpl() |
SimpleScpClientImpl(SimpleClient client) |
SimpleScpClientImpl(SimpleClient client,
ScpClientCreator scpClientCreator) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected CloseableScpClient |
createScpClient(ClientSession session) |
protected CloseableScpClient |
createScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) |
SimpleClient |
getClient() |
ScpClientCreator |
getScpClientCreator() |
boolean |
isOpen() |
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
|
void |
setClient(SimpleClient client) |
void |
setScpClientCreator(ScpClientCreator scpClientCreator) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnpublic SimpleScpClientImpl()
public SimpleScpClientImpl(SimpleClient client)
public SimpleScpClientImpl(SimpleClient client, ScpClientCreator scpClientCreator)
public SimpleClient getClient()
public void setClient(SimpleClient client)
public ScpClientCreator getScpClientCreator()
public void setScpClientCreator(ScpClientCreator scpClientCreator)
public CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException
SimpleScpClientscpLogin in interface SimpleScpClienttarget - The target SocketAddressusername - 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
SimpleScpClientscpLogin in interface SimpleScpClienttarget - The target SocketAddressusername - Usernameidentity - The KeyPair identityCloseableScpClient - Note: closing the client also closes its
underlying sessionIOException - If failed to login or authenticateprotected CloseableScpClient createScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) throws IOException
IOExceptionprotected CloseableScpClient createScpClient(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.