public class SimpleScpClientImpl extends 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(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, warn
public 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
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(IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) throws IOException
IOException
protected CloseableScpClient createScpClient(ClientSession session) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.