Package org.apache.sshd.scp.client
Class SimpleScpClientImpl
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.scp.client.SimpleScpClientImpl
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,SimpleScpClient
public class SimpleScpClientImpl extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements SimpleScpClient
TODO Add javadoc- Author:
- Apache MINA SSHD Project
-
-
Constructor Summary
Constructors Constructor Description SimpleScpClientImpl()SimpleScpClientImpl(SimpleClient client)SimpleScpClientImpl(SimpleClient client, ScpClientCreator scpClientCreator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected CloseableScpClientcreateScpClient(ClientSession session)protected CloseableScpClientcreateScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider)SimpleClientgetClient()ScpClientCreatorgetScpClientCreator()booleanisOpen()CloseableScpClientscpLogin(SocketAddress target, String username, String password)Creates an SCP session using the provided credentialsCloseableScpClientscpLogin(SocketAddress target, String username, KeyPair identity)Creates an SCP session using the provided credentialsvoidsetClient(SimpleClient client)voidsetScpClientCreator(ScpClientCreator scpClientCreator)-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
-
-
-
Constructor Detail
-
SimpleScpClientImpl
public SimpleScpClientImpl()
-
SimpleScpClientImpl
public SimpleScpClientImpl(SimpleClient client)
-
SimpleScpClientImpl
public SimpleScpClientImpl(SimpleClient client, ScpClientCreator scpClientCreator)
-
-
Method Detail
-
getClient
public SimpleClient getClient()
-
setClient
public void setClient(SimpleClient client)
-
getScpClientCreator
public ScpClientCreator getScpClientCreator()
-
setScpClientCreator
public void setScpClientCreator(ScpClientCreator scpClientCreator)
-
scpLogin
public CloseableScpClient scpLogin(SocketAddress target, String username, String password) throws IOException
Description copied from interface:SimpleScpClientCreates an SCP session using the provided credentials- Specified by:
scpLoginin interfaceSimpleScpClient- Parameters:
target- The targetSocketAddressusername- Usernamepassword- Password- Returns:
- Created
CloseableScpClient- Note: closing the client also closes its underlying session - Throws:
IOException- If failed to login or authenticate
-
scpLogin
public CloseableScpClient scpLogin(SocketAddress target, String username, KeyPair identity) throws IOException
Description copied from interface:SimpleScpClientCreates an SCP session using the provided credentials- Specified by:
scpLoginin interfaceSimpleScpClient- Parameters:
target- The targetSocketAddressusername- Usernameidentity- TheKeyPairidentity- Returns:
- Created
CloseableScpClient- Note: closing the client also closes its underlying session - Throws:
IOException- If failed to login or authenticate
-
createScpClient
protected CloseableScpClient createScpClient(org.apache.sshd.common.util.io.functors.IOFunction<? super SimpleClient,? extends ClientSession> sessionProvider) throws IOException
- Throws:
IOException
-
createScpClient
protected CloseableScpClient createScpClient(ClientSession session) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-