public class SimpleScpClientImpl extends AbstractLoggingBean implements SimpleScpClient
| Modifier and Type | Field and Description |
|---|---|
private SimpleClient |
clientInstance |
private ScpClientCreator |
scpClientCreator |
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(ClientSession session,
ScpClient client) |
protected CloseableScpClient |
createScpClient(IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) |
SimpleClient |
getClient() |
ScpClientCreator |
getScpClientCreator() |
boolean |
isOpen() |
CloseableScpClient |
scpLogin(java.net.SocketAddress target,
java.lang.String username,
java.security.KeyPair identity)
Creates an SCP session using the provided credentials
|
CloseableScpClient |
scpLogin(java.net.SocketAddress target,
java.lang.String username,
java.lang.String password)
Creates an SCP session using the provided credentials
|
void |
setClient(SimpleClient client) |
void |
setScpClientCreator(ScpClientCreator scpClientCreator) |
getSimplifiedLoggerprivate SimpleClient clientInstance
private ScpClientCreator scpClientCreator
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(java.net.SocketAddress target, java.lang.String username, java.lang.String password) throws java.io.IOException
SimpleScpClientscpLogin in interface SimpleScpClienttarget - The target SocketAddressusername - Usernamepassword - PasswordCloseableScpClient - Note: closing the client also closes its
underlying sessionjava.io.IOException - If failed to login or authenticatepublic CloseableScpClient scpLogin(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity) throws java.io.IOException
SimpleScpClientscpLogin in interface SimpleScpClienttarget - The target SocketAddressusername - Usernameidentity - The KeyPair identityCloseableScpClient - Note: closing the client also closes its
underlying sessionjava.io.IOException - If failed to login or authenticateprotected CloseableScpClient createScpClient(IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) throws java.io.IOException
java.io.IOExceptionprotected CloseableScpClient createScpClient(ClientSession session) throws java.io.IOException
java.io.IOExceptionprotected CloseableScpClient createScpClient(ClientSession session, ScpClient client) throws java.io.IOException
java.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOException